#include n;main(p){scanf("%d%d",&n,&p);puts("!="+(!p|n==1));}