#include<iostream> using namespace std; int main() { int a,b,c,year; cin>>a>>b>>c>>year; if(year==2001) { cout<<b<<endl<<b-a; } if(year==2002) { cout<<c<<endl<<c-b; } }