#include using namespace std; #define fi first #define se second #define countof(array) (sizeof(array) / sizeof(array[0])) #define rep(i,n) for(int i = 0; i < (n); ++i) #define rrep(i,n) for(int i = (n)-1; i >= 0; --i) #define rep2(i,n) for(int i = 1; i <= (n); ++i) #define rrep2(i,n) for(int i = (n); i > 0; --i) #define srep(i,s,n) for(int i = s; i < (n); ++i) #define rsrep(i,s,n) for(int i = (n)-1; i >= s; --i) #define all(a) (a).begin(),(a).end() #define rall(a) (a).rbegin(),(a).rend() #define aall(a) (a), (a)+countof(a)//for array sorting #define raall(a) (a), (a)+countof(a), greater<>() #define show(x) cout<<#x<<" = "<<(x)< P; typedef vector

vpair; typedef vector vint; typedef vector vll; typedef vector vdouble; typedef vector vstr; typedef vector vbool; typedef vector vvint; typedef vector vvll; typedef vector vvstr; typedef vector vvbool; const ll LINF = 2000000000000000000ll; const int INF = 1000000100; const ll MOD = 1e9+7; int main() { int n; cin >> n; int ans = 1; while ((1<