#include <bits/stdc++.h>

using namespace std;
using ll = long long;

void solve();

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    ll q = 1;
    while (q--) {
        solve();
    }
}

const ll INF = 1e18;

void solve() {
    ll n, m, g;
    cin >> n >> m >> g;
    for (int i = 0; i < m; i++) {
        ll a, b;
        cin >> a >> b;
    }
    cout << 0 << '\n' << 1;
} 