#include #include std::set findFactors(int n) { std::set factors; for (int i = 1; i * i <= n; i++) { if (n % i == 0) { factors.insert(i); factors.insert(n / i); } } return factors; } bool isRationalTan(int angle) { std::set numer_factors = findFactors(angle); std::set denom_factors = findFactors(180 - angle); for (int numer : numer_factors) { for (int denom : denom_factors) { if ((180 * numer) % (denom * (180 - numer)) == 0) { return true; } } } return false; } int main() { int I; std::cin >> I; if (isRationalTan(I)) { std::cout << "Yes" << std::endl; } else { std::cout << "No" << std::endl; } return 0; }