#include <bits/stdc++.h>
using namespace std;

using ll = long long;

int main() {
    cin.tie(0);
    ios_base::sync_with_stdio(0);

    ll n; cin >> n;
    int cnt = 0;
    for (ll i = 2; i * i <= n; i++) {
        if (n % i == 0) {
            while (n % i == 0) {
                n /= i;
            }
            cnt++;
        }
    }
    if (n > 1) cnt++;
    cout << (cnt <= 2 ? "Yes" : "No") << '\n';
    return 0;
}