package main import ( "fmt" "bufio" "os" "strconv" ) func main() { sc.Split(bufio.ScanWords) n := nextInt() s := nextLine() ans := false for i := 0; i <= n; i++ { for j := i + 1; j+j-i <= n; j++ { //fmt.Println(i, j) if s[i:j] == s[j:j+j-i] { ans = true j = n i = n } } } if ans { fmt.Println("YES") } else { fmt.Println("NO") } } var sc = bufio.NewScanner(os.Stdin) func nextLine() string { sc.Scan() return sc.Text() } func nextInt() int { i, _ := strconv.Atoi(nextLine()) return i }