f[x,y]=print$x*y-x-y m@main=getLine>>=f.map read.words>>m