#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
    int w, h;
    cin >> w >> h;
    cout << log2(w*h) << '\n';
    cout << w*h + log2(w*h) * w*h << ' ' << ceill(w*h + log2(w*h) * w*h);
}
