What is the largest positive integer $n < 1000$ for which there is a positive integer $m$ satisfying \[\text{lcm}(m,n) = 3m \times \gcd(m,n)?\]


Let's think step by step and output the final answer within \boxed{}.
user