func main() var ans: bool :: false var t: []char :: cui@input() if(t =& null) do cui@print("NO\n") ret end if for i(0, ^t - 2) for j(i + 1, ^t - 1) var s: []char :: ##t for x(0, ^s - 1) if(x < i | j < x | (x - i) % 2 = 1) var c: char :: s[x] for y(0, ^s - 1) if(s[y] = c) do s[y] :: ' ' end if end for end if end for var f: bool :: true for x(0, ^s - 1) if(i <= x & x <= j) if((x - i) % 2 = 0) if(s[x] = ' ') do f :: false end if else if(s[x] <> ' ') do f :: false end if end if end if end for if(f) do ans :: true end if end for end for do cui@print(ans ?("Yes\n", "NO\n")) end func