#include<iostream>
using namespace std;
int main () {
    int num=1,numm=2;
    int br1=0,br2=0;
int brc=0,brn=0,n,n1;
cin>>n;
cin>>n1;
while(n1%2==1){
brn=0;
num=1;
br1++;
while(num!=n1){
    brn++;
    num=num+2;
}
brn=brn-br1;

n=n-1;
if(n==0){
    cout<<brn<<" "<<brc;
    return 0;
}cin>>n1;
}
while(n1%2==0){
brc=0;
numm=2;
br2++;
while(num!=n1){
    brc++;
    numm=numm+2;
}
brc=brc-br2;

n==n-1;
if(n==0){
    cout<<brn<<" "<<brc;
    return 0;
}
cin>>n1;
}













return 0;
}
