struct Rat{int n,d;}; bool operator<(Rat a,Rat b){ return a.n*b.dv; rep(a,1,1000){ rep(b,1,a){ if(gcd(a,b)==1){ Rat r; r.n=b; r.d=a; v.push_back(r); if(v.size()==125000){ break_break; } } } } sort(v.begin(),v.end()); wt((ll)v.size()*8); int x=80119821,y=0; for(auto t=v.begin();t!=v.end();++t){ wt(x-=t->n,y+=t->d); } for(auto t=v.rbegin();t!=v.rend();++t){ wt(x-=t->d,y+=t->n); } for(auto t=v.begin();t!=v.end();++t){ wt(x-=t->d,y-=t->n); } for(auto t=v.rbegin();t!=v.rend();++t){ wt(x-=t->n,y-=t->d); } for(auto t=v.begin();t!=v.end();++t){ wt(x+=t->n,y-=t->d); } for(auto t=v.rbegin();t!=v.rend();++t){ wt(x+=t->d,y-=t->n); } for(auto t=v.begin();t!=v.end();++t){ wt(x+=t->d,y+=t->n); } for(auto t=v.rbegin();t!=v.rend();++t){ wt(x+=t->n,y+=t->d); } }