//
//  main.cpp
//  Prob1
//
//  Created by Nasca Sergiu Alin on 14/05/16.
//  Copyright Š 2016 Nasca Sergiu Alin. All rights reserved.
//

#include <iostream>
#include <fstream>

using namespace std;

long long cmmdc(long long a, long long b)
{
    long long c = 1;
    while(c != 0)
    {
        c = a % b;
        a = b;
        b = c;
    }
    return a;
}

int main(int argc, const char * argv[])
{
    long long a, b;
    cin >> a >> b;
    
    //cout << cmmdc(a,b);
    
    cout << "2\n";
    cout << "1 " << a*b/cmmdc(a, b) << "\n";
    cout << "3 ";
    if(a > b)
    {
        cout << b;
    }
    else if(a < b)
    {
        cout << a;
    }
    else cout << 2 * a;
    
    return 0;
}