#include <bits/stdc++.h>
using namespace std;
int main() {
  bool ans = false;
  int n;
  cin >> n;
  string s;
  cin >> s;
  map<char, int> m;
  if (s.size() == 1) {
    ans = true;
  }
  for (int i = 0; i < s.size(); i++) {
    m[s[i]]++;
  }
  for (auto a : m) {
    if (a.second > 1) {
      ans = true;
      break;
    }
  }
  if (ans)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
