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