CF21B Intersection
Description
You are given two set of points. The first set is determined by the equation $ A_{1}x+B_{1}y+C_{1}=0 $ , and the second one is determined by the equation $ A_{2}x+B_{2}y+C_{2}=0 $ .
Write the program which finds the number of points in the intersection of two given sets.
Input Format
The first line of the input contains three integer numbers $ A_{1},B_{1},C_{1} $ separated by space. The second line contains three integer numbers $ A_{2},B_{2},C_{2} $ separated by space. All the numbers are between -100 and 100, inclusive.
Output Format
Print the number of points in the intersection or -1 if there are infinite number of points.