#include <iostream>
#include <vector>
#include <stack>
#include <deque>
#include <queue>
#include <set>
#include <bitset>
#include <unordered_set>
#include <map>
#include <unordered_map>
#include <cmath>
#include <iomanip>
#include <algorithm>
#include <random>

using namespace std;

random_device rd;
mt19937 rnd(rd());

#define int long long

void solve() {
    int n, m, gr; cin >> n >> m >> gr;
    for (int i = 0; i < m; i++) {
        int v, u; cin >> v >> u;
    }
    cout << n << endl;
    cout << 1 << endl;
}

int32_t main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    solve();
}
