#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 7;
const int INF = 1e9 + 7;
const int MOD = 998244353;
char s[maxn];
int a[27];
int main() {
  int i, j, n, m, t, z;
  scanf("%d", &n);
  scanf("%s", s + 1);
  for (i = 1; i <= n; i++) {
    a[s[i] - 'a']++;
  }
  int cnt = 0, cnt1 = 0;
  for (i = 0; i < 26; i++) {
    if (a[i] == 1)
      cnt++;
    else if (a[i] > 1)
      cnt1++;
  }
  if (cnt > 1 && cnt1 == 0) {
    puts("No");
  } else
    puts("Yes");
  return 0;
}
