while True:
    try:
        for num in map(int, input().split('.')):
            if num < 0 or num > 255:
                print('No!')
                break
        else:
            print('Yes!')
    except:
        break