#include using namespace std; using ll = long long; vector prime; void erat(ll N){ prime.resize(N+1, 1); prime[0] = 0; prime[1] = 0; for (ll i=2; i*i<=N; i++){ if (prime[i]){ for (ll j=i*2; j <= N; j+=i){ prime[j] = 0; } } } } int main(){ cin.tie(nullptr); ios_base::sync_with_stdio(false); /* 4は2*2に分解しない方がいい 6以上は分解した方がいい。 */ ll X, N=2e5, ng=0, nb=0, x, y; cin >> X; if (X == 1){ cout << 2 << endl; cout << 1 << " " << 2 << endl; cout << 'b' << " " << 'g' << endl; return 0; } vector v; //茶色の頂点の番号 map mp; erat(N); for (int i=2; i<=N; i++){ if (!prime[i]) continue; while(X % i == 0){ X /= i; mp[i]++; } } if (X > N){ cout << -1 << endl; return 0; } x = mp[2]; y = x/2; //4がy個 for (int i=0; i N){ cout << -1 << endl; return 0; } cout << nb+ng << endl; for (int i=0; i