long s=1,i;main(x){for(;~scanf("%d",&x);++i<3?s*=x:(s-=x));i=!puts(s?"NO":"YES");}