J=lambda:list(map(int,input().split())) N,*_=J() A=J() print("YNeos"[any(A[i]+A[N+~i]-A[0]-A[-1]for i in range(N))::2])