思维 + 平面几何
#include <bits/stdc++.h>
using i64 = long long;
int main() {
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
double x1, y1, x2, y2;
std::cin >> x1 >> y1 >> x2 >> y2;
int ans = 0;
if (x1 * x2 <= 0) {
ans ++;
}
if (y1 * y2 <= 0) {
ans ++;
}
if (ans == 2 && y1 * x2 == x1 * y2) {
ans --;
}
std::cout << ans << "\n";
return 0;
}