integer*8::H,W,N,K read *, H,W,N,K if(MOD(H*W,N).eq.MOD(K,N)) then print '(a)', "YES" else print '(a)', "NO" end if end