Let $n$ be a positive integer. For a positive integer $m$, we partition the set $\{1, 2, 3,...,m\}$ into $n$ subsets, so that the product of two different elements in the same subset is never a perfect square. In terms of $n$, find the largest positive integer $m$ for which such a partition exists.
Problem
Source: Canada RepĂȘchage 2019/4 CMOQR
Tags: partition, number theory, Subsets, Perfect Square