#include <bits/stdc++.h>   using namespace std;   int n;   bool isp(int a) {     for (int i = 2; i * i <= a; i++)       if (a % i == 0) return false;     return true;   }   int power[100001];   long long pow(long long a, long long b, long long MOD = n) {     long long ret = 1, c = a;     while (b) {       if (b & 1) ret = (ret * c) % MOD;       b >>= 1;       c = (c * c) % MOD;     }     return ret;   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     cin >> n;     if (n < 4) {       cout <<  YES n ;       for (int i = 1; i <= n; i++) cout << i <<    ;     } else if (n == 4)       cout <<  YES n1 3 2 4  <<   n ;     else if (isp(n) == false)       cout <<  NO  <<   n ;     else {       cout <<  YES  <<   n ;       int g;       for (g = 2; g < n; g++) {         int i, j = 1;         for (i = 1;; i++) {           j = (g * j) % n;           if (j == 1) break;         }         if (i == n - 1) break;       }       power[0] = 1;       for (int i = 1; i < n; i++) power[i] = (power[i - 1] * 1ll * g) % n;       for (int i = 0; i < n - 1; i++)         cout << power[i % 2 ? i : n - i - 1] <<   n ;       cout << n <<   n ;     }     return 0;   }   