#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string a;
  cin >> a;
  std::vector<int> v(26, 0);
  for (auto&& i : a) {
    v[i - 97]++;
  }
  int count = 0;
  for (int i = 0; i < 26; ++i) {
    count += ((v[i] > 1) ? 1 : 0);
  }
  cout << (count > 0 || n == 1 ? "YES" : "NO");
}
