#include #include using namespace std; using namespace atcoder; #define rep(i, n) for(int i=0;i<(n);++i) #define rep1(i, n) for(int i=1;i<=(n);i++) #define ll long long using mint = modint998244353; using P = pair; using lb = long double; using T = tuple; #ifdef LOCAL # include # define dbg(...) debug_print::multi_print(#__VA_ARGS__, __VA_ARGS__) #else # define dbg(...) (static_cast(0)) #endif int main() { ll x; cin >> x; vector vs; if(x==1) { cout << 2 << endl; cout << 1 << " " << 2 << endl; cout << 'b' << " " << 'g' << endl; return 0; } for(int i=3;i<=2e5;i++) { while(x%i==0) { vs.push_back(i); x /= i; } } if(x%2==0) { vs.push_back(2); x/=2; } if(x!=1) { cout << -1 << endl; return 0; } int n = vs.size(); vector c; rep(i,n) c.push_back('b'); vector> edge; for(int i=1;i2e5) { cout << -1 << endl; return 0; } } } cout << c.size() << endl; for(auto e : edge) { cout << e.first+1 << " " << e.second+1 << endl; } for(auto t : c) { cout << t << " "; } cout << endl; return 0; }