#include <iostream>
using namespace std;

int main(){
    ios::sync_with_stdio(0);
    cin.tie(0);

    int n;
    cin >> n;

    int a, b, s;
    for (int i = 0; i < n; i++){
        cin >> a >> b;
        s += a + b;
    }

    cout << (s + n - 1)/(n-2) << ' ' << n;

}
