 N = scanf("%d","C");
 a = scanf("%d");
 A(N+1,1)=0;
 A= transpose(reshape(a,[3,N]));
 A(N+1,1)=0;
 A=circshift(A,[1,0]);
 B=circshift(A,[1,0]);
 C=A-B;
 C=abs(C);
 yojotime=C(:,1)-C(:,2)-C(:,3);
 yojotime(1,1)=0;
 yojotimemod=mod(yojotime,2);
 
 
 clear1=find(yojotimemod);
 clear2=find(yojotime<0);

if clear1 >= 1 || clear2 >= 1
    disp("No")
else
    disp("Yes")
end