#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
const long long inf = 0x3f3f3f3f;
inline long long mul(long long x, long long y, long long mod) {
  long long res = (x * y - (long long)(long double)(x / mod * y + 1e-8) * mod);
  return res < 0 ? res + mod : res;
}
const double PI = acos(-1.0);
const int mod = 1e9 + 7;
long long qPow(long long base, long long n) {
  long long res = 1;
  while (n) {
    if (n & 1) res = (res * base);
    base = (base * base);
    n >>= 1;
  }
  return res;
}
int main() {
  int n;
  char s[maxn];
  int vis[277];
  memset(vis, 0, sizeof(vis));
  scanf("%d%s", &n, s);
  int fg = 0;
  for (int i = 0; s[i]; i++) {
    vis[s[i] - 0]++;
    if (vis[s[i] - 0] > 1 || vis[s[i] - 0] == n) fg = 1;
  }
  if (fg)
    puts("YES");
  else
    puts("NO");
  return 0;
}
