14682 - Check if line passes through the origin   

Description

Input four positive integers a,b,c,d. These represent two distinct points (a,b) and (c,d).

If the line connecting (a,b) and (c,d) passes through the origin (0,0), output 1. Otherwise, output 0.

(Hint: Recall y = ax + b)

Input

Input four integers: a,b,c,d.

Output

One integer: 1 if the line passes through the origin, otherwise 0.

Ensure that the output, including formatting, exactly matches the provided samples.

Sample Input  Download

Sample Output  Download

Tags

11410EE 231002



Discuss