func main() var n: int :: cui@inputInt() var s: []char :: cui@input() var ans: bool :: n > 3 if(n = 1) do ans :: false elif(n = 2) do ans :: !(s = "01" | s = "10") elif(n = 3) do ans :: !(s = "010" | s = "101") end if do cui@print(ans ?("YES\n", "NO\n")) end func