#include "bits/stdc++.h"

using namespace std;

#define int long long

void solve() {
    int n, m, g1;
    cin >> n >> m >> g1;

    vector<vector<int>> g(n + 1);

    for (int i = 0; i < m; i++) {
        int f, t;
        cin >> f >> t;
        g[f].emplace_back(t);
    }

    cout << 0 << ' ' << 0 << '\n';
}
signed main() {
#ifdef local
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    int akbalin = 1;
    // cin >> akbalin;

    for (int i = 1; i <= akbalin; i++) {
        solve();
    }
}