#include <iostream>
using namespace std;
int main ()
{
int x[10000],n,simpar=0,pimpar=1;
cin>>n;
for(int i=1;i<=n;i++)
cin>>x[i];
for(int i=1;i<=n;i++)
{
if(x[i]%2==1) simpar+=x[i];
if(i%2==1)
if(x[i]%2==1) pimpar*=x[i];
}
cout<<simpar<<" "<<pimpar;
return 0;
}