#include <stdio.h>
struct A
{
    int x;
    int y;
};

int main() {
    int num=0,i=0,resx=0,resy=0;
    scanf("%d\n",&num);
    struct A arr[num];

    //获取值输入
    for(i=0;i<num;i++)
    {
        scanf("%d %d",&arr[i].x,&arr[i].y);
    }

    //遍历计算输出
    for(i=0;i<num;i++)
    {
        resx += arr[i].x;
        resy += arr[i].y;
    }

    printf("%d %d",resx,resy);
    
    return 0;
}