#------------------------------
# J1: Squares
from math import sqrt
n = int(input())
side = int(sqrt(n))            # or: side = int(n ** 0.5)
print("The largest square has side length " + str(side) + ".")

#------------------------------
# J1: Body Mass Index
weight = float(input())
height = float(input())
bmi = weight / (height * height)

if bmi > 25:
    print("Overweight")
elif 18.5 <= bmi <= 25:
    print("Normal weight")
else:
    print("Underweight")

#------------------------------
# J1: Who is in the Middle?
a = int(input())
b = int(input())
c = int(input())

if b <= a <= c or c <= a <= b:
    print(a)
elif a <= b <= c or c <= b <= a:
    print(b)
else:
    print(c)

#------------------
# OR: (alternate solution)
# the middle one is what remains after removing the largest and the smallest
print(a + b + c - max(a, b, c) - min(a, b, c))

#------------------------------
# J1: Cupcake Party
regular = int(input())
small = int(input())
total = regular*8 + small*3
print(total-28)

#------------------------------
#  J1: Winning Score
a3, a2, a1 = int(input()), int(input()), int(input())
b3, b2, b1 = int(input()), int(input()), int(input())

a_total = a3 * 3 + a2 * 2 + a1
b_total = b3 * 3 + b2 * 2 + b1

if a_total > b_total:
    print("A")
elif a_total == b_total:
    print("T")
else:
    print("B")

#------------------------------
# J1: Telemarketer or not?
first = int(input())
second = int(input())
third = int(input())
fourth = int(input())

if (first == 8 or first == 9) and (second == third) and (fourth == 8 or fourth == 9):
    print("ignore")
else:
    print("answer")

#------------------
# OR: (alternate solution)

if first == 8 or first == 9:
    if fourth == 8 or fourth == 9:
        if second == third:
            print("ignore")
        else:
            print("answer")
    else:
        print("answer")
else:
    print("answer")

#------------------------------
#  J1: Dog Treats
s = int(input())
m = int(input())
l = int(input())

if (1 * s + 2 * m + 3 * l) >= 10:
    print("happy")
else:
    print("sad")

#------------------------------
# J1: Quadrant Selection
x = int(input())
y = int(input())
if x > 0 and y > 0:
  print("1")
if x < 0 and y > 0:
  print("2")
if x < 0 and y < 0:
  print("3")
if x > 0 and y < 0:
  print("4")
