#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int main() {
  int n, arr[maxn];
  cin >> n;
  string s;
  cin >> s;
  if (n == 1) {
    cout << "YES";
    return 0;
  }
  for (int i = 0; i < n; i++) {
    arr[s[i]]++;
    if (arr[s[i]] == 2) {
      cout << "YES";
      return 0;
    }
  }
  cout << "NO";
  return 0;
}
