favorite We need a little bit of your help to keep things running, click on this banner to learn more

PP2. Week 3: March 15 - 21

Point on a line

Determine whether a point belongs to the line given by equation Ax + By + C = 0.


Five integers - the coordinates of the point x, y and the coefficients A, B, C of the line equation (it is guaranteed that A and B are not simultaneously 0).


Print "YES", if the point belongs to the line and "NO" otherwise.

Time limit 1 second
Memory limit 128 MiB
Input example #1
3 7 -2 1 -1
Output example #1