#include #define rep(i, n) for(int i = 1; i <= (int)(n) / 2; i++) using namespace std; int main() { int n; cin >> n; int sum = 0; rep(i, n) { if (n % i == 0) sum += i; } if (sum == n) cout << "Yes"; else cout << "No"; return 0; }