You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
489 B
C++

#include <bits/stdc++.h>
using namespace std;
const int N = 1050;
pair<int, int> p1[N], p2[N];
int main() {
int n;
scanf("%d", &n);
for (int i = 0; i < n; i++)
scanf("%d%d", &p1[i].first, &p1[i].second);
for (int i = 0; i < n; i++)
scanf("%d%d", &p2[i].first, &p2[i].second);
auto ans1 = *min_element(p1, p1 + n), ans2 = *max_element(p2, p2 + n);
printf("%d %d", ans1.first + ans2.first, ans1.second + ans2.second);
return 0;
}