#include <iostream>
using namespace std;
int n1, n2, x;
double map, mai, s1, s2;
int main()
{
do
{
cin >> x;
if (x != 0 && x % 2 == 0) n2 ++, s2 = s2 + x;
if (x != 0 && x % 2 == 1) n1 ++, s1 = s1 + x;
} while (x != 0);
map = double(s2/n2);
mai = double(s1/n1);
cout << map << " " << mai;
return 0;
}