Problems

# Point and triangle

# Point and triangle

Does the point **O** belongs to the triangle **ABC**?

#### Input

Contains the coordinates of the points **O**, **A**, **B**, **C**. All values are integer, not greater than **100** by absolute value.

#### Output

Print **1** if the point **O** belongs to the triangle **ABC** and **0** otherwise.

Input example #1

1 1 -1 0 2 4 4 1

Output example #1

1