#include using namespace std; typedef long long ll; const int INF = 1<<30; const long long INFLL = 1LL<<60; const int MOD = 998244343; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int x, y, z; cin >> x >> y; cout << 4 << endl; if (x == 0 && y == 0) cout << 0 << " " << 0 << " " << 0 << " " << 0 << endl; if (x == 0 && y == 1) cout << 0 << " " << 1 << " " << 1 << " " << 1 << endl; if (x == 1 && y == 0) cout << 1 << " " << 0 << " " << 0 << " " << 0 << endl; if (x == 1 && y == 1) cout << 1 << " " << 1 << " " << 1 << " " << 1 << endl; cin >> z; if (z == 0) cout << 0 << endl; else cout << 1 << endl; }