#include using namespace std; const int MAXN = 50001; int n, m; struct El{ int x, y, st; }; El u[MAXN], v[MAXN]; bool sortfunc(El a1, El a2) { return (a1.x < a2.x ||(a1.x == a2.x && a1.y < a2.y)); } int main() { freopen("war.in", "r", stdin); freopen("war.out", "w", stdout); int i, j; long long midx = 0, midy = 0; cin>>n>>m; for(i=1;i<=n;i++) { cin>>u[i].x>>u[i].y>>u[i].st; midx+= u[i].x; midy+= u[i].y; } for(i=1;i<=m;i++) { cin>>v[i].x>>v[i].y>>v[i].st; midx+= v[i].x; midy+= v[i].y; } midx/= (n+m); midy/= (n+m); cout<