$$\ 1$$.($$\ 16$$ marks)Consider a chessboard of size $$\ 8$$ units$$\ \times8$$ units (i.e., each small square on the board has a side length of $$\ 1$$ unit).Let $$\ S$$ be the set of all the $$\ 81$$ vertices of all the squares on the board.What is the number of line segments whose vertices are in $$\ S$$,and whose length is a positive integer. (The segments need not be parallel to the sides of the board.)

$$\ 2$$.($$\ 16$$ marks)For any positive integer $$\ n$$, let $$\ d(n)$$ denotes the number of positive divisors of $$\ n$$; and let $$\ \phi(n)$$ denotes the number of elements from the set $$\ \{1,2,…,n\}$$ that are co-prime to $$\ n$$.(For example $$\ d(12)=6$$ and $$\ \phi(12)=4$$.)

Find the smallest positive integer $$\ n$$ such that $$\ d(\phi(n))=2017$$.

$$\ 3$$.($$\ 16$$ marks)Let $$\ P(x)$$ and $$\ Q(x)$$ be polynomials of degree $$\ 6$$ and degree $$\ 3$$ respectively,such that:
$$\ P(x)>Q(x)^2+Q(x)+x^2-6$$, for all $$\ x\in\mathbb{R}$$.

If all the roots of $$\ P(x)$$ are real numbers, then prove that there exist two roots of $$\ P(x)$$, say $$\ \alpha,\beta$$, such that $$\ |\alpha-\beta|<1$$.

$$\ 4$$.($$\ 16$$ marks)Let $$\ l_1,l_2,l_3,\dots,l_{40}$$ be forty parallel lines.As shown in the diagram, let m be another line that intersects the line $$\ l_1$$ to $$\ l_{40}$$ in the points $$\ A_1,A_2.A_3,\dots,A_{40}$$ respectively.Similarly let n be another line that intersects the lines $$\ l_1$$ to $$\ l_{40}$$ in the points $$\ B_1,B_2,B_3,\dots,B_{40}$$ respectively.

Given that $$\ A_1B_1=1$$, $$\ A_{40}B_{40}=14$$, and the areas of the $$\ 39$$ trapeziums $$\ A_1B_1B_2A_2$$,$$\ A_2B_2B_3A_3,\dots$$,$$\ A_{39}B_{39}B_{40}A_{40}$$ are all equal; then count the number of segments $$\ A_iB_i$$ whose length is a positive integer; where $$\ i\in\{1,2,\dots,40\}$$. $$\ 5$$.($$\ 18$$ marks)If $$\ a,b,c,d\in\mathbb{R}$$ such that $$\ a>b>c>d>0$$ and $$\ a+d=b+c$$;

then prove that :

$$\frac{(a+b)-(c+d)}{\sqrt{2}}>\sqrt{a^2+b^2}-\sqrt{c^2+d^2}$$

$$\ 6$$.($$\ 18$$ marks)Let $$\ \triangle{ABC}$$ be acute-angled; and let $$\ \Gamma$$ be its circumcircle.Let $$\ D$$ be a point on minor arc $$\ BC$$ of $$\ \Gamma$$.Let $$\ E$$ and $$\ F$$ be points on line $$\ AD$$ and $$\ AC$$ respectively, such that $$\ BE\perp AD$$ and $$\ DF\perp AC$$.Prove that $$\ EF\parallel BC$$ if and only if $$\ D$$ is the midpoint of $$\ BC$$.