X = int(input())
if X>=30:print("Yes")
else:print("No") X = int(input()) X int(input()) int input() input if X>=30:print("Yes")
else:print("No") X>=30 X 30 X = int(input()) int(input()) X
X = int(input())
if X>=30:print("Yes")
else:print("No")