#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll INF = 1e18;

void obla() {
    ll n, m, g; cin >> n >> m >> g;
    for (int i = 0; i < m; i++) {
        ll v, u; cin >> v >> u;
    }
    cout << m << ' ' << m << '\n';
}

int main() {
    int t = 1; //cin >> t;
    cin.tie(0);
    ios::sync_with_stdio(0);
    while (t--) {
        obla();
    }
}
