def is_three_squares(n): if n < 0: return False if n == 0: return True while n % 4 == 0: