$a_1,a_2,...,a_n$ are 8 distinct positive integers. $b_1,b_2,...,b_n$ are another 8 distinct positive integers ($a_i,b_j$ are not necessarily y distinct for $i, j = 1, 2, ...8$).Enter the smallest possible value of $a^2_1b_1+a^2_2b_2+...+a^2_8b_8$
Here's how i tried using AM-GM inequality
$$\frac{a^2_1b_1+a^2_2b_2+...+a^2_8b_8}{8}\ge(a^2_1b_1.a^2_2b_2...a^2_8b_8)^{1/8}$$ $$a^2_1b_1+a^2_2b_2+...+a^2_8b_8\ge8(a_1.a_2...a_8)^{1/4}(b_1.b_2...b_8)^{1/8}$$ since $a$'s and $b$'s are distinct least I can go with their product is $a_1.a_2...a_8=b_1.b_2...b_8=1.2.3.4.5.6.7.8=8!$
plugging in this value least value I got is 427 where as the actual answer is 540