#include #include #include #include using namespace std; typedef long long ll; ll x[100010],y[100010]; ll gcd(ll a, ll b){ if(a> a >> b >> c >> d >> n; ll mod = abs(a*d - b*c); for(i=0;i> x[i] >> y[i]; } if(mod==0){ ll e = gcd(a,c); map mp; for(i=0;i,ll> mp; for(i=0;i