#include using namespace std; int main(){ int i,j,h,w; cin >> h >> w; if(h==1){ cout << 0 << endl; for(i=0;i=w){ cout << h*(w - 1) << endl; for(i=0;i