#include <bits/stdc++.h>
using namespace std;
struct big_int {
  vector<int> C;
  big_int(int from = 0) { C.push_back(from); }
  void print() {
    printf("%d", C.back());
    for (int i = (int)C.size() - 2; i >= 0; --i) printf("%08d", C[i]);
  }
  void read() {
    char D[100];
    scanf("%s", &D);
    C.clear();
    for (int i = (int)strlen(D); i > 0; i -= 8) {
      D[i] = 0;
      C.push_back(atoi(i >= 8 ? D + i - 8 : D));
    }
  }
  big_int operator+(big_int w) {
    big_int ret;
    ret.C.clear();
    int carry = 0;
    for (int i = 0; i < max(C.size(), w.C.size()) || carry; ++i) {
      ret.C.push_back(carry + ((i < C.size()) ? C[i] : 0) +
                      ((i < w.C.size()) ? w.C[i] : 0));
      carry = (ret.C.back() >= 100000000);
      if (carry) ret.C.back() -= 100000000;
    }
    return ret;
  }
  big_int operator-(big_int w) {
    big_int ret;
    ret.C.clear();
    int carry = 0;
    for (int i = 0; i < w.C.size() || carry; ++i) {
      ret.C.push_back(C[i] - ((i < w.C.size()) ? w.C[i] : 0) - carry);
      carry = (ret.C.back() < 0);
      if (carry) ret.C.back() += 100000000;
    }
    while (ret.C.size() > 1 && ret.C.back() == 0) ret.C.pop_back();
    return ret;
  }
  big_int operator*(big_int w) {
    big_int ret;
    ret.C.resize(C.size() + w.C.size());
    for (int i = 0; i < C.size(); ++i)
      for (int j = 0, carry = 0; j < w.C.size() || carry; ++j) {
        long long T =
            ret.C[i + j] + carry + C[i] * 1ll * (j < w.C.size() ? w.C[j] : 0);
        ret.C[i + j] = T % 100000000;
        carry = T / 100000000;
      }
    while (ret.C.size() > 1 && ret.C.back() == 0) ret.C.pop_back();
    return ret;
  }
};
const long long modul = 1000000007;
long long s12[650], BEG;
set<long long> U;
set<long long>::iterator it;
vector<pair<int, int> > fp;
void output(int sf, int ss) {
  big_int F(1), S(1);
  for (int i = 0; i < sf; ++i) F = F * 12;
  for (int i = 0; i < ss; ++i) S = S * 12;
  (F + S).print();
}
int main() {
  int i, j, k, l;
  char T;
  for (;;) {
    scanf("%c", &T);
    if (T < '0' || T > '9') break;
    BEG = (10 * BEG + T - '0') % modul;
  }
  s12[0] = 1;
  for (i = 1; i < 650; ++i) s12[i] = (12 * s12[i - 1]) % modul;
  for (i = 0; i < 650; ++i)
    for (j = i; j < 650; ++j)
      if (BEG == (s12[i] + s12[j]) % modul) U.insert(i + j + 1);
  if (U.size() == 0) {
    printf("NO\n");
    goto END;
  }
  l = U.size();
  if (l > 1000) l = 1000;
  printf("YES\n%d\n", l);
  printf("%d", *(it = U.begin()));
  for (i = 1; i < l; ++it, ++i) printf(" %d", *it);
  printf("\n");
  for (it = U.begin(); it != U.end(); ++it) {
    k = *it - 1;
    for (i = 0; i <= k / 2; ++i)
      if ((s12[i] + s12[k - i]) % modul != BEG)
        fp.push_back(pair<int, int>(k - i, i));
  }
  sort(fp.begin(), fp.end());
  l = fp.size();
  if (l > 1000) l = 1000;
  printf("%d\n", l);
  if (l > 0) output(fp[0].first, fp[0].second);
  for (i = 1; i < l; ++i) {
    printf(" ");
    output(fp[i].first, fp[i].second);
  }
  if (l > 0) printf("\n");
END:
  return 0;
}
