Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x1 = int(input())
- y1 = int(input())
- x2 = int(input())
- y2 = int(input())
- x3 = int(input())
- y3 = int(input())
- x4 = int(input())
- y4 = int(input())
- if x4 > x1 and y4 > y1 and x3 <= x1 and y3 <= y1: S = (x4 - x1) * (y4 - y1)
- elif x1 > x4 and y1 > y4 and x1 <= x3 and y1 <= y3: S = (x1 - x4) * (y1 - y4)
- elif x2 > x3 and y2 > y3 and x1 <= x2 and y1 <= y2: S = (x2 - x3) * (y2 - y3)
- else: S = 0
- print(S)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement