hours,start,cd=map(int,input().split()) rooms=list(range(hours)) time=start for i in range(100000): if time in rooms: rooms.remove(time)
time+=cd if time>= hours: time-=hours if len(rooms)==0: print("Yes") else: print("No",len(rooms),rooms) 本地测试都会超时