#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace std;
using namespace __gnu_pbds;
#define int long long
using ll = long long;

typedef tree<int, null_type,less<>,rb_tree_tag,tree_order_statistics_node_update> ordered_set;

const int N = 2000+10, inf = 1e18;
vector<int> g[N];

signed main () {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    int n, m, t, u, v;
    cin >> n >> m >> t;
    for (int i = 1; i <= m; i++) {
        cin >> u >> v;
        g[u].push_back(v);
    }
    cout << m - (n-1) << '\n' << 1;
    return 0;
}