#include<stdio.h>
int main()
{
    int n,m;
    scanf("%d%d",&n,&m);
    int s;
    s=(n*n)-m;
    if(m==0)
    {
        printf("%d\nAs zero squares will be painted white, all the squares will be painted black.",m);
    }
    else
    {
        printf("%d\nThere are %d squares in a %d×%d square grid. %d of them will be painted white, so the remaining %d squares will be painted black.",n*n,n,n,m,s);
    }
    return 0;
}
