#include using namespace std; #define rep(i, a, b) for(int i = a; i < (b); ++i) #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() #define pb push_back typedef long long ll; typedef pair pii; typedef vector vi; constexpr int X = 144, Y = 84; int main() { cin.tie(0)->sync_with_stdio(0); auto get = []() { int n; cin >> n; vector> stones(n); for(int i = 0; i < n; i++) cin >> stones[i].first >> stones[i].second; return stones; }; auto dist = [](pair p) { int dx = p.first-X; int dy = p.second-Y; return dx*dx+dy*dy; }; int redScore = 0; int yellowScore = 0; for(int i = 0; i < 10; i++) { vector> red = get(); vector> yellow = get(); for(auto r : red) { int add = 1; for(auto y : yellow) { if(dist(r) >= dist(y)) add = 0; } redScore += add; } for(auto y : yellow) { int add = 1; for(auto r : red) { if(dist(y) >= dist(r)) add = 0; } yellowScore += add; } } cout << redScore << " " << yellowScore << "\n"; }