import strscans let(_,h,w,n,k)=stdin.readAll.scanTuple"$i $i $i $i" echo:["NO","YES"][ord h*w mod n==k mod n]