Mr chanek array n integer the prettiness value denote assum_i1n sum_j1n gcda_i a_j cdot gcdi jwhere gcdx y denote great common divisor GCD integers x yin word prettiness value array total sum gcda_i a_j cdot gcdi j pair jhelp Mr Chanek find prettiness value output result modulo 109 7