#include using namespace std; #include #include #include #include #include template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } #define rep(i,n) for (int i = 0; i < (n); ++i) typedef long long ll; using P=pair; const ll INF=1e18; const int mod=1e9+7; void solve(){ ll a,b,c,d,e; cin>>a>>b>>c>>d>>e; ll l=(a+b)/__gcd(a+b,c+d)*(c+d); ll ans=0; for(int i=0;i=1&&r<=c&&r>=1){ ans++; } } cout<