ll@N,@A[N]; rep(i,N-1)if(A[i]==A[i+1])wt("Yes"),return 0; rep(i,N-2)if(A[i]==A[i+2])wt("Yes"),return 0; wt("No");