#include <bits/stdc++.h>
using namespace std;
int x, y, z, w;
int main() {
cin >> x >> y >> z >> w;
if(z != 0){
if((x / z) * w == y) cout << x / z << endl;
else cout << -1 << endl;
}
else if(w == 0) cout << -1 << endl;
else cout << y / w << endl;
return 0;
}
帮个忙吧,谢谢。