#include using namespace std; #define dbg(x) (cout<<#x<<" = "<<(x)<<'\n') typedef long long int lld; const int INF = (1LL << 30) - 1; const lld LINF = (1LL << 62) - 1; int MOD1, MOD2; int main() { cin.sync_with_stdio(false); #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif scanf("%d%d", &MOD1, &MOD2); printf("%d\n", 2); printf("%d %lld\n", 1, MOD1 * 1LL * MOD2); printf("%d %lld\n", 3, MOD1 * 1LL * MOD2 * 2); return 0; }