# Author: Scott Wehrwein
# Date: 10/08/2025
# Takes five integer arguments, a, b, c, d, and x.
# Prints True if x is between a and b OR between c and d.
# For our purposes, the intervals are exclusive - we don't count
# a as being in the interval from a to b.

import sys

a = int(sys.argv[1])
b = int(sys.argv[2])
c = int(sys.argv[3])
d = int(sys.argv[4])
x = int(sys.argv[5])

print((a < x and x < b) or (c < x < d))

