Can any1 tell me whats wrong with this code? Why WA??

#include<stdio.h>

#include<math.h>

int main()

{

long int m,n,num;

while(1)

{

scanf("%ld%ld",&m,&n);

if(m==0 && n==0)

break;

//if(m==0)

// continue;

//if(n==0)

// continue;

if(m==1 || n==1)

{

if(m<n)

num=n;

else

num=m;

}

else if(m>=3&&n>=3)

num=((m*n)+1)/2;

else if(m==2 || n==2)

{

if(m<n)

num=2*(n/2 + 1);

else

num=2*(m/2 + 1);

}

if(num>1)

printf("%ld knights may be placed on a %ld row %ld column board.\n",num,m,n);

else

printf("%ld knight may be placed on a %ld row %ld column board.\n",num,m,n);

}

return 0;

}

the out put 0f 2*100 board = 102 pieces isnt it true??