#include <iostream>
using namespace std;
int main()
{ int a,b,c,d;
while(cin>>a>>b>>c>>d) cout<<(a+b)<<"\n"<<(c+d);
system("pause");
return 0;}