#pragma GCC optimize("O3,unroll-loops")
#include<bits/stdc++.h>
#pragma GCC target("avx,avx2,bmi,bmi2")

using namespace std;

#define all(x) (x).begin(),x.end()

#ifdef DBG
#define debug(x) cout << #x << " = " << x << endl
#else
#define debug(x) 
#endif

using ll = long long;

const int INF = 1e9;

mt19937 rnd(42);

inline void solve() {
    int n, m, _;
    cin >> n >> m >> _;
    vector<vector<int>> g(n);

    for (int i = 0; i < m; ++i) {
        int a, b;
        cin >> a >> b;
        a--;
        b--;
        g[a].push_back(b);
    }
    
    cout << m - n + 1 << endl;
    cout << 1 << endl;
} 


int main() {
    int t = 1;
    #ifdef DBG
    cin >> t;
    #endif
    for (int i = 0; i < t; ++i) {
        solve();
        #ifdef DBG
        cout << '\n';
        #endif
    }
}