#pragma GCC optimize("O3, unroll-loops, no-stack-protector")
#include <iostream>
#include <set>
#include <map>
#include <vector>
#include <stack>
#include <deque>
#include <queue>
#include <unordered_set>
#include <unordered_map>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#define int long long

using namespace std;

const int INF = 2e15;

signed main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	int n, m, q;
	cin >> n >> m >> q;
	vector <vector <int>> g(n);
	int cnt = 0;
	for (int i = 0; i < m; i++) {
		int v, u;
		cin >> v >> u;
		v--;
		u--;
		g[v].push_back(u);
		if (u - v > 1) {
			cnt++;
		}
	}
	cout << cnt << '\n' << 1 << '\n';
}
