verbatimtex
\input latex.pre
etex

beginfig(1);
numeric u;
u=3mm;

numeric w,h;
w=4;
h=10;

numeric i;
for i=0 upto h:
  draw (0,i*u)--(w*u, i*u);
endfor;

for i=0 upto w:
  draw (i*u,0)--(i*u, h*u);
endfor;

def makecross(expr a,b)=
   pickup pencircle scaled 1pt;
   draw (a*u,b*u)--((a+1)*u,(b+1)*u);
   draw (a*u,(b+1)*u)--((a+1)*u,b*u);
enddef;

for i=0 upto 6:
   makecross(0,i);
endfor;
for i=0 upto 4:
   makecross(1,i);
endfor;
for i=0 upto 2:
   makecross(2,i);
endfor;
for i=0 upto 7:
   makecross(3,i);
endfor;

label.bot (btex $2$ etex, (0.5u,0u));
label.bot (btex $3$ etex, (1.5u,0u));
label.bot (btex $4$ etex, (2.5u,0u));
label.bot (btex $5$ etex, (3.5u,0u));

endfig;
bye
