#include <bits/stdc++.h>

using namespace std;

#define mp make_pair
#define pb push_back
#define ll long long

ll mod1, mod2;

void print(ll z) {
	cout << 2 << "\n";
	cout << 1 << " " << z << "\n";
	cout << 3 << " " << 0 << "\n";
}

int main() {
	ios::sync_with_stdio(false);
	#ifndef ONLINE_JUDGE
	freopen("test.in", "r", stdin);
	//freopen("test.out", "w", stdout);
	#endif

	cin >> mod1 >> mod2;

	ll x = mod1 * mod2;
	print(x);

	return 0;
}