def main(): h, w, n, k = map(int, input().split()) if h == 1 or w == 1: print("YES") else: print("pww") if __name__ == "__main__": main()