import java.util.Scanner;
public class a002 {
public static void main(String[] args) {
int[] a=new int[2];
Scanner cin=new Scanner(System.in);
for(int j=0;j<2;j++)
{
int sum=0;
for(int i=0;i<2;i++)
{
a[i]=cin.nextInt();
sum+=a[i];
}
System.out.println(sum);
}
}
}