#include using namespace std; using Int = long long; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a>a>>b>>c>>d; Int n; cin>>n; vector xs(n),ys(n); for(Int i=0;i>xs[i]>>ys[i]; if(a*d-b*c==0){ Int dx=__gcd(a,c); Int dy=__gcd(b,d); using P = pair; set

sp; if(dx==0){ for(Int i=0;i; set

sp; for(Int i=0;i