A number is happy if repeatedly replacing it by the sum of the squares of its digits eventually reaches 1. If it loops forever without reaching 1, it is not happy. Given `n`, return true if it is happy.