# Arup Guha
# 9/3/2018
# Does the desk fit in the room?

import random

# Get the desk and room dimensions.
roomlen = int(input("What is the length of the room in feet?\n"))
roomwidth = int(input("What is the width of the room in feet?\n"))
desklen = int(input("What is the length of the desk in feet?\n"))
deskwidth = int(input("What is the width of the desk in feet?\n"))

# Force length to be >= width for room.
if roomlen < roomwidth:
    temp = roomlen
    roomlen = roomwidth
    roomwidth = temp

# Force length to be >= width for desk
if desklen < deskwidth:
    temp = desklen
    desklen = deskwidth
    deskwidth = temp

# Output if it fits or not.
if deskwidth < lenwidth and desklen < roomlen:
    print("Great the desk fits!")
else:
    print("Sorry, the desk does not fit.")
