ll@h,@w;wt(2min(h/2*w,w/2*h));rep(i,h){wtSp(h*w%2?min(i+1,w)!=min((1..w),h):h%2<=i&w%2<(1..));wt("");}