#include #define ff first #define ss second #define pb push_back typedef long long ll; using namespace std; typedef pair pii; const int mod=1e9+7; inline int add(int x,int y){int ret=x+y;if(ret>=mod)ret-=mod;return ret;} inline int sub(int x,int y){int ret=x-y;if(ret<0)ret+=mod;return ret;} inline int mul(int x,int y){return ((ll)x*y)%mod;} inline int step(int base,int pw){int ret=1;while(pw){if(pw&1)ret=mul(ret,base);base=mul(base,base);pw>>=1;}return ret;} inline int invv(int x){return step(x,mod-2);} inline char gc() { // like getchar() static char buf[1 << 16]; static size_t bc, be; if (bc >= be) { buf[0] = 0, bc = 0; be = fread(buf, 1, sizeof(buf), stdin); } return buf[bc++]; // returns 0 on EOF } ll readInt() { ll a, c; while ((a = gc()) < 40); if (a == '-') return -readInt(); while ((c = gc()) >= 48) a = a * 10 + c - 480; return a - 48; } ll rr[20]; struct polyn{ vectora; polyn(){} polyn(vectorb){a=b;} void push_back(int x){ a.pb(x); } int size(){return a.size();} void resize(int n){a.resize(n);} int& operator [](int x){ if(x>=a.size())a.resize(x+1); return a[x]; } polyn operator -(polyn b){ polyn ret; ret.resize(max(b.size(),(int)a.size())); for(int i=0;i