#include<bits/stdc++.h>

using namespace std;

const int MAXN = 21;

vector<int> g[MAXN];
vector<int> ng[MAXN];
vector<int> ncol;
vector<int> gcol;

vector<int> ord;
int was[MAXN];

int n, m, g;

void dfs(int v){
    was[v] = 1;
    for(auto to : g[v]){
        if(!was[to]) dfs(to);
    }
    ord.push_back(v);
}

vector<int> now;

int mn = 1e9;

void paint(int v){
    was[v] = 1;
    now.push_back(v);
    mn = min(mn, v);
    for(auto to : ng[v]){
        if(!was[to]) paint(to);
    }
}

void get_comps(){
    ncol.clear();
    ncol.resize(n);
    for(int i = 0; i < n; i++){
        was[i] = 0;
    }
    for(int i = 0; i < n; i++){
        if(!was[i]){
            dfs(i);
        }
    }
    for(int i = 0; i < n; i++){
        was[i] = 0;
    }
    for(auto v : ord){
        if(was[v]) continue;
        mn = 1e9;
        now.clear();
        paint(v);
        for(auto x : now){
            ncol[x] = mn;
        }
    }
}

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cin >> n >> m >> g;
    for(int i = 0; i < m; i++){
        int a, b;
        cin >> a >> b;
        a--; b--;
        g[a].push_back(b);
    }
    cout << m - n << " " << 1;
}
