Perfect square (#50) - Azerbaijan Computing Olympiad