#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
char c[MAXN];
int n;
int cnt[30];
int main() {
  scanf("%d", &n);
  scanf("%s", c);
  if (n == 1) {
    puts("YES");
    return 0;
  }
  bool ok = false;
  for (int i = 0; i < n; ++i) {
    ++cnt[c[i] - 'a'];
    if (cnt[c[i] - 'a'] >= 2) {
      ok = true;
      break;
    }
  }
  if (ok)
    puts("YES");
  else
    puts("NO");
}
