3367: Intersect

内存限制:128 MB 时间限制:3.000 S
评测方式:文本比较 命题人:
提交:21 解决:8

题目描述

 If a point P is on the segment AB and another segment CD at the same time,we say that P is an intersect point for AB and CD.

      For two segments in two dimensions,how many intersect point do they have?     

输入

There are multiple test cases.

For each test case:the first line contains 4 integers represent th x-coordinate of point A, y-coordinate of point A,x-coordinate of point B,y-coordinate of point B,the second line contains 4 integers represent th x-coordinate of point C, y-coordinate of point C,x-coordinate of point D,y-coordinate of point D.

You can assume for all input integers v,-2<=v<=2,and A and B are always at different position,,C and D are always at different position,too.

输出

For each test case:

If AB and CD have no intersect point,output a single line contains the string "None",

If AB and CD have just one intersect point,output a single line contains the string "One",

If AB and CD have more than one intersect point(such as many),output a single line contains the string "Many".

样例输入 复制

-2 -2 -2 -1
-2 -2 -2 2
-2 -2 -2 -1
-2 -2 -1 0

样例输出 复制

Many
One

来源/分类