#include <bits/stdc++.h>
#define IOS ios_base::sync_with_stdio(0);
#define tie cin.tie(0);
  
using namespace std;
template < class T > T emin(T &a,T b) {if (a > b) a = b;return a;}
template < class T > T emax(T &a,T b) {if (a < b) a = b;return a;}

long long n, m;

int main(){
    IOS tie
    cin >> n >> m;
    cout << 2 << "\n";
    cout << 1 << " " << 1LL * n * m << "\n";
    cout << 3 << " " << 2LL * n * m;
}