Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = input()
- b = input()
- c = input()
- d = input()
- x1 = int(a.split()[0])
- y1 = int(a.split()[1])
- x2 = int(b.split()[0])
- y2 = int(b.split()[1])
- x3 = int(c.split()[0])
- y3 = int(c.split()[1])
- x4 = int(d.split()[0])
- y4 = int(d.split()[1])
- s = abs((x1*(y3-y2)+x2*(y1-y3)+x3*(y2-y1))/2)
- s1= abs((x4*(y1-y2)+x2*(y1-y4)+x1*(y4-y2))/2)
- s2 = abs((x4*(y3-y2)+x2*(y4-y3)+x3*(y2-y4))/2)
- s3 = abs((x4*(y3-y1)+x1*(y4-y3)+x3*(y4-y1))/2)
- if s == s1+s2+s3:
- print('In')
- else:
- print('Out')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement