#include using namespace std; //#include //atcoder用 //using namespace atcoder; //atcoder用 using ll = long long; using ld = long double; using vi = vector; using vl = vector; using vc = vector; using vs = vector; using vb = vector; using Graph = vector>; //using pri = priority_queue; //最大値 //using pri = priority_queue, greater>; //最小値 #define _GLIBCXX_DEBUG #define endl "\n" #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define ALL(f,c,... ) (([&](decltype((c)) cccc) { return (f)(std::begin(cccc), std::end(cccc), ## __VA_ARGS__); })(c)) const int INF = 1e9; const int MININF = -1e9; const ll LINF = 1e18; const int MOD = 1e9+7; const int MODD = 998244353; // 4方向 vi vx={0,1,0,-1}; vi vy={1,0,-1,0}; // a bool chmax(T &a, const T& b){ if(abならaをbに更新 template bool chmin(T &a, const T& b){ if(a>b){ a=b; return true; } return false; } // 素数判定 bool prime(ll N){ if(N==1)return false; for (ll i=2;i*i<=N;i++){ if (N%i == 0)return false; } return true; } // 約数列挙 vl factor(int X){ vl ans; for(int i=1;i*i<=X;i++){ if(X%i!=0){ continue; } ans.emplace_back(i); if(i!=X/i){ ans.emplace_back(X/i); } } return ans; } // 素因数分解 vl primefactor(ll N){ vl ans; for(ll i=2;i*i<=N;i++){ while(N%i==0){ N/=i; ans.emplace_back(i); } } if(2<=N)ans.emplace_back(N); return ans; } // エラトステネスの篩 vb Eratosthenes(ll n){ vb prime(n+1,true); prime[0]=prime[1]=false; for(ll i=2;i+i<=n;i++){ if(!prime[i])continue; for(ll j=i*2;j<=n;j+=i){ prime[j]=false; } } return prime; } // 一次元座標圧縮 vi compress(vi &A){ vi B=A; ALL(sort,B); B.erase(unique(B.begin(),B.end()),B.end()); vi ans(A.size()); for(int i=0;i>S; if(S.size()<3){ cout<<"NA"<