#include<iostream> using namespace std; int a[10]; int year,c; int main() { for(int i=0;i<10;i++){ cin>>a[i]; } cin>>year; int y=year-2000; cout<<a[y]<<endl; if(y==0){ cout<<0; } else{ cout<<a[y]-a[y-1]; } return 0; }