#include <bits/stdc++.h>
using namespace std;
#define int long long

vector<vector<int>> graf;

int32_t main()
{
    ios::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
    int n, m, g; cin >> n >> m >> g;
    graf.resize(n);
    for (int i = 0; i < m; ++i){
        int x, y; cin >> x >> y;
        graf[x-1].push_back(y-1);
    }
    cout << m - n + 1 << " " << 1;
}
