#include using namespace std; using ll = long long; const ll mod=998244353; using vll =vector; using vvll =vector; #define all(A) A.begin(),A.end() #define rep(i,n) for(int i=0;i 1) { ll mid = (R +L) / 2; if (mid * mid <= N)L = mid; else R = mid; } return L; } ll gcd(ll(a), ll(b)) { if (a == 0)return b; if (b == 0)return a; ll c = a; while (a % b != 0) { c = a % b; a = b; b = c; } return b; } int main(){ vector> P; ll N=1e6/4; vector>> G; for(ll i=1;i<=1200;i+=2){ for(ll j=i+2;j<=1200;j+=2){ ll g=gcd(i,j); if(g!=1)continue; G.push_back({double(i)/double(j),{i,j}}); G.push_back({double(j)/double(i),{j,i}}); if(G.size()==N)break; } } sort(all(G)); reverse(all(G)); //cout<0||ny<-1e9){ cout<<"ERROR"<=0;n--){ P[N+(N-n-1)]={-P[n].first,P[n].second}; } //N=P.size(); for(ll n=2*N-1;n>=0;n--){ P[2*N+(2*N-n-1)]={P[n].first,-P[n].second}; } cout<