#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m = 0, a[26];
  string s;
  cin >> n >> s;
  memset(a, 0, sizeof(a));
  if (n == 1) {
    cout << "YES";
    goto a;
  }
  for (int i = 0; i < n; i++) {
    a[s[i] - 97]++;
    m = max(m, a[s[i] - 97]);
    if (m == 2) {
      goto b;
    }
  }
b:;
  cout << (m == 1 ? "NO" : "YES");
a:;
  return 0;
}
