For a positive integer $n$, define $f(x)$ to be the smallest positive integer $x$ satisfying the following conditions: there exists a positive integer $k$ and $k$ distinct positive integers $n=a_0<a_1<a_2<\cdots<a_{k-1}=x$ such that $a_0a_1\cdots a_{k-1}$ is a perfect square. Find the smallest real number $c$ such that there exists a positive integer $N$ such that for all $n>N$ we have $f(n)\leq cn$. Proposed by Fysty and amano_hina