#include <bits/stdc++.h>

#define ll long long

using namespace std;

void fast_in_out() {
    cin.tie(nullptr);
    ios_base::sync_with_stdio(false);
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
}
const ll mod=1e9+7;
vector<ll> g[2010],q,gr[2010];
ll used[2010][2010],c[2010][2010],t=1,to[2010],out[2010];

int main() {
    fast_in_out();
    ll n,m,useless,x,y,i,ans=0;
    cin >> n >> m >> useless;
    ans=m-(n-1);
    while(m--) {
        cin >> x >> y;
        g[x].push_back(y);
    }
    cout << ans << " " << 1;
    return 0;
}
