Panic is rising in the committee for doggo standardization — the puppies of the new brood have been born multi-colored! In total there are 26 possible colors of puppies in the nature and they are denoted by letters from 'a' to 'z' inclusive.

The committee rules strictly prohibit even the smallest diversity between doggos and hence all the puppies should be of the same color. Thus Slava, the committee employee, has been assigned the task to recolor some puppies into other colors in order to eliminate the difference and make all the puppies have one common color.

Unfortunately, due to bureaucratic reasons and restricted budget, there's only one operation Slava can perform: he can choose a color $x$ such that there are currently at least two puppies of color $x$ and recolor all puppies of the color $x$ into some arbitrary color $y$. Luckily, this operation can be applied multiple times (including zero).

For example, if the number of puppies is $7$ and their colors are represented as the string "abababc", then in one operation Slava can get the results "zbzbzbc", "bbbbbbc", "aaaaaac", "acacacc" and others. However, if the current color sequence is "abababc", then he can't choose $x$='c' right now, because currently only one puppy has the color 'c'.

Help Slava and the committee determine whether it is possible to standardize all the puppies, i.e. after Slava's operations all the puppies should have the same color.


-----Input-----

The first line contains a single integer $n$ ($1 \le n \le 10^5$) — the number of puppies.

The second line contains a string $s$ of length $n$ consisting of lowercase Latin letters, where the $i$-th symbol denotes the $i$-th puppy's color.


-----Output-----

If it's possible to recolor all puppies into one color, print "Yes".

Otherwise print "No".

Output the answer without quotation signs.


-----Examples-----
Input
6
aabddc

Output
Yes

Input
3
abc

Output
No

Input
3
jjj

Output
Yes



-----Note-----

In the first example Slava can perform the following steps:   take all puppies of color 'a' (a total of two) and recolor them into 'b';  take all puppies of color 'd' (a total of two) and recolor them into 'c';  take all puppies of color 'b' (three puppies for now) and recolor them into 'c'. 

In the second example it's impossible to recolor any of the puppies.

In the third example all the puppies' colors are the same; thus there's no need to recolor anything.

Source: codeforces | Difficulty: EASY
Tags: Sorting

Implementation


Solutions:
n = int(input())
string = input()
array = []
for i in range(0, 27):
	array.append(0)
for j in range(0, n):
	num = ord(string[j]) - 96
	array[num] += 1
if len(string) == 1:
	print('Yes')
else:
	for i in array:
		if i == 0:
			continue
		elif i >= 2:
			print('Yes')
			break
	else:
		print('No')


n = input()
s = input()
if len(set(s)) == 1:
	print('Yes')
else:
	for i in set(s):
		if s.count(i) >= 2:
			print('Yes')
			break
	else:
		print('No')


i = input
i()
a = i()
b = set(a)
print('YNeos'[len(b) > 1 and all((x < 2 for x in map(a.count, b)))::2])


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI():
	return [tuple(map(int, l.split())) for l in sys.stdin]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def main():
	n = I()
	c = collections.Counter(S())
	if len(c) < 2 or max(c.values()) > 1:
		return 'Yes'
	return 'No'
print(main())


n = int(input())
s = input()
li = [0] * 26
for ch in s:
	li[ord(ch) - ord('a')] += 1
maxi = 0
for item in li:
	maxi = max(maxi, item)
if maxi > 1 or n == 1:
	print('Yes')
else:
	print('No')


n = int(input())
po = list(input())
p = list(set(po))
if n == 1:
	print('Yes')
elif len(po) == len(p):
	print('No')
else:
	print('Yes')


n = int(input())
s = input()
d = {}
for i in s:
	d[i] = d.get(i, 0) + 1
l = list(d.values())
c = 0
for j in l:
	if j >= 2:
		c = 1
if n != 1:
	print('No' if c == 0 else 'Yes')
else:
	print('Yes')


n = int(input())
colors = input()
alpha = [1] * 26
prev = colors[0]
diff = 1
if n == 1:
	print('Yes')
	exit()
for i in range(n):
	if colors[i] != prev:
		break
	if i == n - 1:
		print('Yes')
		exit()
for i in range(n):
	if alpha[ord(colors[i]) - 97] == 1:
		alpha[ord(colors[i]) - 97] = 0
	else:
		print('Yes')
		exit()
print('No')


n = int(input())
s = input()
a = [0] * 1000
for c in s:
	a[ord(c)] += 1
if max(a) > 1 or n == 1:
	print('Yes')
else:
	print('No')


l = int(input())
a = str(input())
x = 0
c = 0
if l == 1:
	print('YES')
	exit()
a = sorted(a)
while x < len(a) - 1:
	if a[x] == a[x + 1]:
		c = 1
		break
	x += 1
if c == 1:
	print('YES')
else:
	print('NO')


(x, y) = ([], int(input()))
x[:0] = input()
if y == 1:
	print('YES')
	exit()
for i in range(y):
	if x.count(x[i]) >= 2:
		print('YES')
		exit()
print('NO')


n = int(input())
s = input()
c = [0] * 26
for i in range(n):
	x = ord(s[i]) - ord('a')
	c[x] += 1
c1 = 0
c2 = 0
for i in range(26):
	if c[i] == 1:
		c1 += 1
	elif c[i] > 1:
		c2 += 1
if n == 1:
	print('YES')
elif c2 == 0:
	print('NO')
else:
	print('YES')


n = int(input())
s = input()
if n == 1:
	print('Yes')
	exit(0)
was = set()
for c in s:
	if c in was:
		print('Yes')
		exit(0)
	was.add(c)
print('No')


n = int(input())
s = list(input())
if len(s) == 1:
	print('Yes')
	exit(0)
histogram = {}
for c in s:
	if c in histogram:
		histogram[c] += 1
		print('Yes')
		exit(0)
	else:
		histogram[c] = 1
print('No')


n = int(input())
s = [x for x in input()]
if len(set(s)) == n and n != 1:
	print('No')
else:
	print('Yes')


n = int(input())
a = input()
b = sorted(a)
x = 0
y = 0
for i in range(0, n - 1):
	if b[i] == b[i + 1]:
		x = x + 1
	elif b[i] != b[i + 1] and b[i] != b[i - 1] and (i > 0):
		y = y + 1
if n == 2 and a[0] != a[1]:
	y = y + 1
if x >= y or x > 0:
	print('Yes')
else:
	print('No')


n = int(input())
q = input()
qq = 'abcdefghijklmnopqrstuvwxyz'
qqq = [0] * 30
z = -1
for i in range(n):
	qqq[qq.index(q[i])] += 1
for i in range(30):
	if qqq[i] > 1:
		z = 1
		break
if z == 1 or n == 1:
	print('YES')
else:
	print('NO')


n = int(input())
s = str(input())
t = set(list(s))
if len(s) == len(t) and len(s) > 1:
	print('NO')
else:
	print('YES')


n = int(input())
s = list(input())
print('Yes' if n - len(list(set(s))) > 0 or n == 1 else 'No')


ItIsPossible = False
ass = int(input())
bro = list(map(str, input()))
if len(bro) == 1:
	print('Yes')
elif bro.count('a') > 1:
	print('Yes')
elif bro.count('b') > 1:
	print('Yes')
elif bro.count('c') > 1:
	print('Yes')
elif bro.count('d') > 1:
	print('Yes')
elif bro.count('e') > 1:
	print('Yes')
elif bro.count('f') > 1:
	print('Yes')
elif bro.count('g') > 1:
	print('Yes')
elif bro.count('h') > 1:
	print('Yes')
elif bro.count('i') > 1:
	print('Yes')
elif bro.count('j') > 1:
	print('Yes')
elif bro.count('k') > 1:
	print('Yes')
elif bro.count('l') > 1:
	print('Yes')
elif bro.count('m') > 1:
	print('Yes')
elif bro.count('n') > 1:
	print('Yes')
elif bro.count('o') > 1:
	print('Yes')
elif bro.count('p') > 1:
	print('Yes')
elif bro.count('q') > 1:
	print('Yes')
elif bro.count('r') > 1:
	print('Yes')
elif bro.count('s') > 1:
	print('Yes')
elif bro.count('t') > 1:
	print('Yes')
elif bro.count('u') > 1:
	print('Yes')
elif bro.count('v') > 1:
	print('Yes')
elif bro.count('w') > 1:
	print('Yes')
elif bro.count('x') > 1:
	print('Yes')
elif bro.count('y') > 1:
	print('Yes')
elif bro.count('z') > 1:
	print('Yes')
else:
	print('No')


n = int(input())
l = list(input())
se = 'qwertyuiopasdfghjklzxcvbnm'
k = 0
for i in range(len(se)):
	if l.count(se[i:i + 1]) > 1:
		k = 1
		exit
if len(l) == 1:
	k = 1
if k == 1:
	print('YES')
else:
	print('NO')


n = int(input())
p = input()
d = {}
for c in p:
	if c in d:
		d[c] += 1
	else:
		d[c] = 1
if len(d) == 1:
	print('Yes')
else:
	for v in d.values():
		if v >= 2:
			print('Yes')
			exit()
	print('No')


n = int(input())
s = input()
if len(s) == 1:
	print('YES')
elif len(set(s)) == n:
	print('NO')
else:
	print('YES')


n = int(input())
s = input()
e = set(s)
c = 1
if n > 1:
	c = len(s) - len(e)
print(['YES', 'NO'][c == 0])


from collections import Counter
n = int(input())
s = input()
c = 0
f = 0
D = dict(Counter(s))
X = D.values()
for i in X:
	if i == 1:
		c += 1
	if i == n:
		f = 1
if c == n and f != 1:
	print('NO')
else:
	print('YES')


n = int(input())
s = input()
if len(set(s)) == 1:
	print('Yes')
else:
	for x in s:
		if s.count(x) >= 2:
			print('Yes')
			break
	else:
		print('No')


try:
	while True:
		ans = False
		n = int(input())
		str1 = input()
		dic = {}
		if n == 1:
			ans = True
		for i in range(n):
			if str1[i] in dic:
				ans = True
				break
			else:
				dic[str1[i]] = 1
		if ans:
			print('Yes')
		else:
			print('No')
except Exception as e:
	pass


n = int(input())
s = input()
mp = dict()
if n == 1:
	print('Yes')
	exit()
for i in range(n):
	mp[s[i]] = 0
for i in range(n):
	mp[s[i]] += 1
for i in range(n):
	if mp[s[i]] > 1:
		print('Yes')
		exit()
print('No')


from collections import Counter
n = int(input())
if n == 1:
	print('YES')
	exit()
x = input()
x = list(x)
(a, b) = Counter(x).most_common(1)[0]
print('YES' if b > 1 else 'NO')


n = int(input())
s = input()
if len(set(s)) == n and n != 1:
	print('No')
else:
	print('Yes')


n = int(input())
s = input()
freq = {}
if n == 1:
	print('YES')
else:
	for i in s:
		if i in freq:
			freq[i] += 1
		else:
			freq[i] = 1
	c = 0
	for i in freq:
		if freq[i] >= 2:
			c = 1
			print('YES')
			break
	if c == 0:
		print('NO')


def main():
	input()
	n = input()
	d = {}
	for i in n:
		if i in d:
			d[i] += 1
		else:
			d[i] = 1
	if len(d) == 1:
		print('Yes')
		return
	order = [i[0] for i in sorted(d.items(), key=lambda kv: kv[1], reverse=True)]
	for (i, j) in enumerate(order):
		try:
			if d[j] >= 2:
				d[order[i + 1]] += d[j]
			else:
				print('No')
				return
		except:
			pass
	else:
		print('Yes')
main()


n = int(input())
l = list(input())
p = set(l)
if len(p) != n or n == 1:
	print('YES')
else:
	print('NO')


from collections import Counter
n = int(input())
c = Counter(input())
if n == 1 or c.most_common()[0][1] >= 2:
	print('Yes')
else:
	print('No')


import collections
n = int(input())
s = input()
s = list(s)
if len(s) == 1:
	print('Yes')
else:
	counter = collections.Counter(s)
	for i in counter.values():
		if i > 1:
			print('Yes')
			break
	else:
		print('No')


from collections import deque as de
import math
from collections import Counter as cnt
from functools import reduce
from typing import MutableMapping

def factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))

class My_stack:

	def __init__(self):
		self.data = []

	def my_push(self, x):
		return self.data.append(x)

	def my_pop(self):
		return self.data.pop()

	def my_peak(self):
		return self.data[-1]

	def my_contains(self, x):
		return self.data.count(x)

	def my_show_all(self):
		return self.data

	def isEmpty(self):
		return len(self.data) == 0
arrStack = My_stack()

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def get_prime_factors(number):
	prime_factors = []
	while number % 2 == 0:
		prime_factors.append(2)
		number = number / 2
	for i in range(3, int(math.sqrt(number)) + 1, 2):
		while number % i == 0:
			prime_factors.append(int(i))
			number = number / i
	if number > 2:
		prime_factors.append(int(number))
	return prime_factors

def get_frequency(list):
	dic = {}
	for ele in list:
		if ele in dic:
			dic[ele] += 1
		else:
			dic[ele] = 1
	return dic

def Log2(x):
	return math.log10(x) / math.log10(2)

def isPowerOfTwo(n):
	return math.ceil(Log2(n)) == math.floor(Log2(n))
n = int(input())
s = list(map(str, input()))
if n == 1:
	print('YES')
elif n > 26:
	print('YES')
else:
	k = get_frequency(s)
	if k[max(k, key=k.get)] < 2:
		print('NO')
	else:
		print('YES')


n = input()
word = input()
h = {}
for i in word:
	if i in h:
		h[i] += 1
	else:
		h[i] = 1
if len(word) == 1:
	print('Yes')
elif max(h.values()) >= 2:
	print('Yes')
else:
	print('No')


n = int(input())
s = input()[:n]
bFind = False
if n == 1:
	bFind = True
for i in range(ord('a'), ord('z') + 1):
	i = chr(i)
	if s.count(i) >= 2:
		bFind = True
		break
if bFind:
	print('Yes')
else:
	print('No')


import sys
f = sys.stdin
n = int(f.readline().rstrip('\r\n'))
s = f.readline().rstrip('\r\n')
if n == 1:
	print('YES')
else:
	arr = [0 for i in range(26)]
	for i in s:
		arr[ord(i) - 97] += 1
	for i in range(26):
		if arr[i] >= 2:
			print('YES')
			break
	else:
		print('NO')


n = int(input())
s = input()
if len(s) == 1:
	print('Yes')
	exit(0)
aas = set()
for i in s:
	if i in aas:
		print('Yes')
		break
	else:
		aas.add(i)
else:
	print('No')


n = int(input())
s = input()
if n == 1:
	print('Yes')
elif len(list(set(s))) == n:
	print('No')
else:
	print('Yes')


from collections import Counter
x = int(input())
if x == 0:
	exit(0)
sts = list(input())
if x == 1:
	print('Yes')
	exit(0)
counters = list(Counter(sts).values())
counters.sort()
counters.reverse()
for k in range(len(counters) - 1):
	if counters[k] >= 2:
		counters[k + 1] += counters[k]
if counters[-1] >= 2:
	print('Yes')
else:
	print('No')


input()
k = [x for x in input()]
for i in set(k):
	if k.count(i) > 1 or len(k) == 1:
		print('Yes')
		exit()
print('No')


n = int(input())
string = input()
flag = False
for i in range(n):
	if string.count(string[i]) >= 2:
		flag = True
		break
if n == 1 or flag:
	print('Yes')
else:
	print('No')


n = int(input())
s = input()
print(('No', 'Yes')[len(s) == 1 or len(set(s)) < len(s)])


n = int(input())
string = input()
if len(string) == 1:
	print('Yes')
else:
	cont = {}
	result = True
	for e in string:
		if e in cont:
			cont[e] += 1
			print('Yes')
			result = False
			break
		else:
			cont[e] = 1
	if result:
		print('No')


import sys
import collections
input = sys.stdin.readline

def printnl(val):
	sys.stdout.write(str(val) + '\n')
n = int(input())
s = list(input())[:n]
m = collections.Counter(s)
if n == 1 or max(m.values()) > 1:
	print('Yes')
else:
	print('No')


a = int(input())
b = list(input())
c = list(set(b))
L = 1
for x in range(len(c)):
	if b.count(c[x]) >= 2 or a == 1:
		print('YES')
		L = 0
		break
if L == 1:
	print('NO')


n = int(input())
s = input()
a = [0] * 300
for i in s:
	a[ord(i)] += 1
if max(a) > 1 or n == 1:
	print('Yes')
else:
	print('No')


def lansat():
	input()
	global lans
	lans = [i for i in input()]
	if len(lans) == len(set(lans)) and len(lans) >= 2:
		return 'No'
	return 'Yes'
print(lansat())


n = input()
s = input()
a = [0] * 26
flag = False
for i in range(len(s)):
	a[ord(s[i]) - ord('a')] += 1
for i in a:
	if i >= 2:
		flag = True
if flag or len(s) == 1:
	print('Yes')
else:
	print('No')


n = int(input())
s = input()
c = 0
if n == 1:
	print('YES')
else:
	for i in s:
		if s.count(i) > 1:
			c = 1
			break
	if c == 0:
		print('NO')
	else:
		print('YES')


n = int(input())
u = list(input())
if n == 1:
	print('Yes')
	exit()
s1 = set()
s2 = set()
for i in range(n):
	if u[i] not in s1:
		s1.add(u[i])
	else:
		s2.add(u[i])
if len(s2) > 0:
	print('Yes')
else:
	print('No')


n = int(input())
s = str(input())
y2 = False
for c in range(ord('a'), ord('z') + 1):
	if s.count(chr(c)) > 1:
		y2 = True
		break
print('Yes' if y2 or n == 1 else 'No')


n = int(input())
s = input()
d = {}
if n == 1:
	print('Yes')
	exit()
for i in s:
	if i in d:
		d[i] += 1
	else:
		d[i] = 1
ans = False
for i in d:
	if d[i] >= 2:
		ans = True
		break
if ans:
	print('Yes')
else:
	print('No')


n = int(input())
s = input()
a = []
for x in s:
	a.append(x)
sa = set(a)
if len(sa) == n and n > 1:
	print('no')
else:
	print('yes')


import collections
n = int(input())
s = input()
check = collections.Counter(s)
a = False
for i in check:
	if check[i] != 1:
		a = True
		break
if n == 1:
	print('Yes')
elif a:
	print('Yes')
else:
	print('No')


from collections import Counter
n = int(input())
dog = input()
p = Counter(dog)
ans = 'NO'
if n == 1:
	print('YES')
else:
	for i in range(n):
		if p[dog[i]] > 1:
			ans = 'YES'
			break
	print(ans)


from sys import stdin, stdout
from collections import deque
n = int(stdin.readline())
s = stdin.readline().strip()
a = 'zaqwsxcderfvbgtyhnmjuiklop'
for f in a:
	if s.count(f) >= 2 or n == 1:
		stdout.write('Yes\n')
		break
else:
	stdout.write('No\n')


n = int(input())
s = input()
a = []
for i in range(n):
	a.append(s[i])
a.sort()
cnt = 0
for i in range(1, n):
	if a[i] == a[i - 1]:
		cnt = 1
if len(s) == 1:
	cnt = 1
if not cnt:
	print('No')
else:
	print('Yes')


n = int(input())
dict1 = {}
s = str(input())
flag = 0
if n == 1:
	print('Yes')
else:
	for i in range(n):
		try:
			dict1[s[i]] += 1
			flag = 1
		except:
			KeyError
			dict1[s[i]] = 1
	if flag == 0:
		print('No')
	else:
		print('Yes')


n = int(input())
s = input()
num = [0] * 26
if n == 1:
	print('Yes')
else:
	for i in range(len(s)):
		num[ord(s[i]) - 97] += 1
	fl = False
	for i in range(26):
		if num[i] > 1:
			fl = True
			break
	if fl:
		print('Yes')
	else:
		print('No')


n = int(input())
s = input()
d = dict()
flag = False
for i in s:
	if i in d:
		flag = True
		break
	else:
		d[i] = i
if flag or len(s) == 1:
	print('Yes')
else:
	print('No')


n = int(input())
s = input()
x = set(s)
flag = 0
for i in x:
	if s.count(i) > 1:
		flag = 1
if n == 1:
	print('YES')
elif flag == 1:
	print('YES')
else:
	print('NO')


import collections
n = int(input())
s = input()
if len(s) > 1:
	l = [item for (item, count) in collections.Counter(s).items() if count > 1]
	if len(l) > 0:
		print('Yes')
	else:
		print('No')
else:
	print('Yes')


input()
s = list(input())
if len(set(s)) == len(s) and len(s) > 1:
	print('No')
else:
	print('Yes')


n = int(input())
a = list(input())
seta = set(a)
if n == 1:
	print('YES')
elif len(set(a)) == n:
	print('NO')
else:
	print('YES')


n = int(input().strip())
a = input().strip()
ad = {}
flag = False
for i in range(n):
	if a[i] not in ad:
		ad[a[i]] = 0
	ad[a[i]] += 1
if len(ad) == 1 or len(ad) < n:
	flag = True
if flag:
	print('Yes')
else:
	print('No')


import collections
input()
counter = collections.Counter(input())
if len(counter) == 1:
	print('Yes')
else:
	for k in counter:
		if counter[k] > 1:
			print('Yes')
			break
	else:
		print('No')


n = int(input())
s = input()
count = 0
for i in s:
	f = 0
	for j in s:
		if j == i:
			f += 1
	if f > 1 or len(s) == 1:
		print('Yes')
		count = 1
		break
if count == 0:
	print('No')


n = int(input())
l = list(input())
if n == 1:
	print('YES')
	exit()
if len(set(l)) == n:
	print('NO')
else:
	print('YES')


T = int(input())
text = input()
L = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
for i in range(T):
	L[ord(text[i]) - ord('a')] += 1
check = True
for item in L:
	if item >= 2:
		check = False
		break
if T == 1:
	print('Yes')
elif check:
	print('No')
else:
	print('Yes')


def can_recolor_doggo(s):
	if len(s) == 1:
		return 'YES'
	freq = {}
	for c in s:
		if c in freq:
			return 'YES'
		freq[c] = 1
	return 'NO'
n = int(input())
s = input()
print(can_recolor_doggo(s))


n = int(input())
s = input()
l = [0 for i in range(26)]
for c in s:
	l[ord(c) - 97] += 1
if n > 1 and max(l) == 1:
	print('No')
else:
	print('Yes')


n = int(input())
str = list(input())
dict = {}
if len(str) == 1:
	print('Yes')
	exit(0)
for i in range(0, 26):
	dict[chr(i + 97)] = 0
for character in str:
	dict[character] += 1
	if dict[character] > 1:
		print('Yes')
		exit(0)
print('No')


n = int(input())
s = input()
if n == 1:
	print('Yes')
else:
	t = []
	for i in s:
		t.append(i)
	t = sorted(t)
	b = [0] * 26
	f = 0
	for i in range(n):
		b[ord(t[i]) - 97] += 1
		if b[ord(t[i]) - 97] > 1:
			f = 1
			break
	if f == 1:
		print('Yes')
	else:
		print('No')


x = int(input())
strr = str(input())
if len(strr) == 1 or len(set(strr)) < len(strr):
	print('YES')
else:
	print('NO')


n = input()
s = input()
if s.count(s[0]) == len(s):
	print('Yes')
else:
	for i in range(ord('a'), ord('z') + 1):
		if s.count(chr(i)) >= 2:
			print('Yes')
			break
	else:
		print('No')


(n, s, res) = (int(input()), input(), True)
for i in s:
	if s.count(i) > 1:
		res = False
		break
if n == 1:
	print('Yes')
elif not res:
	print('Yes')
else:
	print('No')


a = lambda : input()
a()
a = a()
print(['NO', 'YES'][len(a) - len(set(a)) >= 1 or len(a) == 1])


from collections import Counter
n = int(input())
s = input()
c = Counter(s)
if len(s) == 1:
	print('Yes')
	exit()
print('No' if all((c[i] == 1 for i in c)) else 'Yes')


N = int(input())
S = {}
for i in input():
	if i in S:
		S[i] += 1
	else:
		S[i] = 1
if N == 1:
	print('Yes')
	exit()
for i in S.values():
	if i >= 2:
		print('Yes')
		exit()
print('No')


n = int(input())
s = list(input())
c = [0] * 26
for i in range(n):
	c[ord(s[i]) - 97] += 1
f = 0
for i in range(26):
	if c[i] >= 2:
		f = 1
if n == 1:
	print('Yes')
elif f == 1:
	print('Yes')
else:
	print('No')


input()
s = input()
if len(s) == 1:
	print('Yes')
	quit()
was = []
for c in s:
	if c in was:
		print('Yes')
		quit()
	was.append(c)
print('No')


n = int(input())
s = input()
b = True
if n == 1:
	print('Yes')
else:
	for t in 'qwertyuiopasdfghjklzxcvbnm':
		if s.count(t) > 1:
			b = False
			print('Yes')
			break
	if b:
		print('No')


from collections import Counter
lens = int(input())
s = input()
sc = Counter(s)
ans = 'No'
if len(set(s)) == 1:
	ans = 'Yes'
else:
	for i in sc:
		if sc[i] >= 2:
			ans = 'Yes'
			break
print(ans)


n = int(input())
s = list(input())
alphabet = [0 for i in range(26)]
for i in range(n):
	tmp = ord(s[i]) - ord('a')
	alphabet[tmp] = alphabet[tmp] + 1
if n == 1:
	print('Yes')
else:
	for i in range(26):
		if alphabet[i] >= 2:
			print('Yes')
			break
		if i == 25 and alphabet[i] <= 1:
			print('No')


y = input()
x = input()
i = 0
j = 0
count = 0
while i < len(x):
	j = 0
	while j < len(x):
		if x[i] == x[j]:
			if i != j:
				count += 1
				break
		j += 1
	if count >= 1:
		break
	i += 1
if len(x) == 1:
	print('yes')
if count >= 1:
	if len(x) != 1:
		print('YES')
if count == 0:
	if len(x) != 1:
		print('NO')


(n, a) = (input(), list(input()))
print('YES' if len(set(a)) < len(a) or len(a) == 1 else 'NO')


z = int(input())
x = input()
v = set(x)
if len(v) != z or z == 1:
	print('YES')
else:
	print('NO')


n = int(input())
s = input()
d = {}
if n == 1:
	print('YES')
	quit()
for i in s:
	if i not in d:
		d[i] = 1
	else:
		print('YES')
		quit()
print('NO')


n = int(input())
a = list(input())
if len(set(a)) == len(a) and len(a) != 1:
	print('No')
else:
	print('Yes')


n = int(input())
a = input()
d = dict()
for i in a:
	d[i] = d.get(i, 0) + 1
print('Yes' if max(d.values()) > 1 or len(set(a)) == 1 else 'No')


from collections import Counter
from sys import stdin, stdout
input = lambda : stdin.readline().rstrip()
write = stdout.write

def main():
	N = int(input())
	S = input()
	puppies = Counter(S)
	(alone, many) = (0, 0)
	for i in puppies.values():
		if i == 1:
			alone += 1
		else:
			many += 1
	if many or N == 1:
		print('Yes')
	else:
		print('No')
main()


n = int(input())
s = input()
f = [0] * 26
for i in range(n):
	f[ord(s[i]) - ord('a')] = f[ord(s[i]) - ord('a')] + 1
if n == 1:
	print('Yes')
elif max(f) >= 2:
	print('Yes')
else:
	print('No')


n = int(input())
s = input()
if len(s) == 1:
	print('Yes')
else:
	cont = {}
	aux = True
	for e in s:
		if e in cont:
			cont[e] += 1
			print('Yes')
			aux = False
			break
		else:
			cont[e] = 1
	if aux:
		print('No')


def solve(string):
	if len(string) == 1:
		return True
	frequencies = {}
	for c in string:
		frequencies[c] = frequencies.get(c, 0) + 1
	has_one = any([freq == 1 for freq in frequencies.values()])
	has_more_than_one = any([freq >= 2 for freq in frequencies.values()])
	return has_more_than_one
i = int(input())
if solve(input()[:i]):
	print('Yes')
else:
	print('No')


n = int(input())
s = str(input())
l = list(s)
l.sort()
con = False
for i in range(n - 1):
	if l[i] == l[i + 1]:
		con = True
if n == 1:
	print('YES')
else:
	print('YES' if con else 'NO')


import collections
n = int(input())
s = collections.Counter(input())
print('Yes' if n == 1 or max(s.values()) > 1 else 'No')


n = int(input())
s = [i for i in input()]
if n == 1:
	print('Yes')
	exit(0)
l = [0] * 200
for i in s:
	l[ord(i)] += 1
for i in l:
	if i >= 2:
		print('Yes')
		exit(0)
print('No')


n = int(input())
s = input()

def go(n, s):
	if n == 1:
		return 'YES'
	l = [0 for i in range(0, 26)]
	for i in range(0, n):
		index = ord(s[i]) - ord('a')
		l[index] += 1
		if l[index] >= 2:
			return 'YES'
	return 'NO'
print(go(n, s))


from collections import Counter
n = int(input())
s = input()
d = Counter(s)
if n == 1 or any((x > 1 for x in d.values())):
	print('Yes')
else:
	print('No')


import sys
import math
fileoperation = 0
if fileoperation:
	orig_stdout = sys.stdout
	orig_stdin = sys.stdin
	inputfile = open('W:/Competitive Programming/input.txt', 'r')
	outputfile = open('W:/Competitive Programming/output.txt', 'w')
	sys.stdin = inputfile
	sys.stdout = outputfile
mod = 1000000007

def nospace(l):
	ans = ''.join((str(i) for i in l))
	return ans
n = int(input())
s = str(input())
ss = set(s)
a = 'Yes'
b = 'No'
if n == 1:
	print(a)
elif len(set(s)) < len(s):
	print(a)
else:
	print(b)
if fileoperation:
	sys.stdout = orig_stdout
	sys.stdin = orig_stdin
	inputfile.close()
	outputfile.close()


n = int(input())
s = input()

def fun(n, s):
	if n == 1:
		return 'Yes'
	else:
		for i in range(n):
			if s[i] in s[:i] + s[i + 1:]:
				return 'yes'
			elif i == n - 1:
				return 'no'
			else:
				continue
print(fun(n, s))


n = input()
n = int(n)
s = input()
Max_Letter = max('qwertyuiopasdfghjklzxcvbnm', key=lambda x: s.count(x))
Max = s.count(Max_Letter)
if n == 1:
	print('Yes')
elif Max > 1:
	print('Yes')
else:
	print('No')


n = int(input())
st = input()
D = {}
boo = False
if len(st) == 1:
	boo = True
else:
	for i in st:
		if i in D:
			boo = True
			break
		D[i] = 1
if boo:
	print('YES')
else:
	print('NO')


n = int(input())
s = list(input())
if n == 1:
	print('Yes')
	return
for el in set(s):
	if s.count(el) >= 2:
		print('Yes')
		return
print('No')


puppies = int(input())
color = input()
dicty = {}
possible = False
for i in color:
	if i in dicty.keys():
		dicty[i] += 1
		if dicty[i] >= 2:
			possible = True
			break
	else:
		dicty[i] = 1
if possible or puppies == 1:
	print('Yes')
else:
	print('No')


n = int(input())
s = input()
if n == 1:
	print('Yes')
	return
else:
	val = [0 for i in range(26)]
	for i in s:
		val[ord(i) - ord('a')] += 1
	k = max(val)
	if k >= 2:
		print('Yes')
	else:
		print('No')


def a():
	n = int(int(input()))
	if n == 1:
		print('YES')
		return
	a = input()
	b = list(set(a))
	c = sum((a.count(b[i]) > 1 for i in range(len(b))))
	print(['NO', 'YES'][c > 0])
a()


n = int(input())
s = list(input())
b = set(s)
if len(b) < n or n == 1:
	print('YES')
else:
	print('NO')


def count_char(l, c):
	count = 0
	for temp in l:
		if temp == c:
			count += 1
	return count
n = int(input())
s = list(input())
di = {}
if n == 2 and s[0] != s[1]:
	print('No')
	quit()
elif n == 1:
	print('Yes')
	quit()
elif n == 3 and s[0] != s[1] and (s[0] != s[2]) and (s[1] != s[0]):
	print('No')
	quit()
else:
	for temp in s:
		if di.__contains__(temp):
			pass
		else:
			di[temp] = count_char(s, temp)
new_s = s
flag = 0
for key in di:
	if di[key] > 1:
		flag = 1
		break
if flag == 1:
	print('Yes')
	quit()
else:
	print('No')
	quit()


N = int(input())
S = input()
if N == 1:
	print('Yes')
elif N == len(set(list(S))):
	print('No')
else:
	print('Yes')


n = int(input())
s = input()
l = [0] * 26
co = 0
for i in s:
	idx = ord(i) - ord('a')
	l[idx] += 1
	if l[idx] > 1:
		print('Yes')
		quit()
	elif l[idx] == 1:
		co += 1
if co == 1:
	print('Yes')
else:
	print('No')


import math as ma
from sys import exit
from decimal import Decimal as dec
from itertools import permutations

def li():
	return list(map(int, input().split()))

def modInverse(a, m):
	m0 = m
	y = 0
	x = 1
	if m == 1:
		return 0
	while a > 1:
		q = a // m
		t = m
		m = a % m
		a = t
		t = y
		y = x - q * y
		x = t
	if x < 0:
		x = x + m0
	return x

def num():
	return map(int, input().split())

def nu():
	return int(input())

def find_gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
n = nu()
s = input()
f = [0] * 26
for i in range(n):
	x = ord(s[i]) - 97
	f[x] += 1
fl = False
for i in range(26):
	if f[i] >= 2:
		fl = True
if n == 1:
	fl = True
if fl == True:
	print('Yes')
else:
	print('No')


n = int(input())
if n == 1:
	print('Yes')
	exit(0)
s = input()
for i in range(26):
	if s.count(chr(ord('a') + i)) >= 2:
		print('Yes')
		exit(0)
print('No')


from sys import stdin, stdout
n = int(input())
doggos = input()
tab = {}
for i in range(n):
	if doggos[i] in tab:
		print('YES')
		exit()
	else:
		tab[doggos[i]] = 1
if n == 1:
	print('YES')
else:
	print('NO')


n = int(input())
s = input()
if n == 1:
	print('YES')
else:
	print('YNeos'[len(set(s)) == n::2])


def test_1():
	import math
	from collections import Counter
	n = list(map(int, input().split(' ')))[0]
	data = input().strip()
	aa = Counter(data)
	count_1 = 0
	count_2 = 0
	for (k, v) in aa.items():
		if v >= 2:
			count_1 += 1
		else:
			count_2 += 1
	if count_1 > 0 or n == 1:
		print('Yes')
	else:
		print('No')
test_1()


n = int(input())
p = list(input())
p.sort()
x = 1
z = 0
if n == 1:
	print('Yes')
else:
	for i in p:
		if p[x] == p[x - 1]:
			print('Yes')
			z = 1
			break
		else:
			x = x + 1
		if x == n:
			break
	if z == 0:
		print('No')


n = int(input())
colors = input()
color_dict = {}
broken = False
for color in colors:
	if color in color_dict or n == 1:
		print('Yes')
		broken = True
		break
	color_dict[color] = 0
if not broken:
	print('No')


n = int(input())
ki = input()
if len(ki) == len(set(ki)) and len(ki) > 1:
	print('NO')
else:
	print('YES')


n = int(input())
s = input()
from collections import Counter
d = Counter(s)
flag = 0
if n == 1:
	print('YES')
	flag = 1
else:
	for i in d.values():
		if i >= 2:
			flag = 1
			print('YES')
			break
if flag == 0:
	print('NO')


n = int(input())
s = input()
e = []
if n == 1:
	print('Yes')
else:
	for f in s:
		if f in e:
			d = 3
		else:
			e.append(f)
	if len(e) == n:
		print('No')
	else:
		print('Yes')


from collections import Counter
n = int(input())
colors = Counter(input())
if len(colors) == 1:
	print('Yes')
else:
	for color in colors:
		if colors[color] > 1:
			print('Yes')
			break
	else:
		print('No')


n = int(input())
s = input()
arr = [0] * 26
for i in s:
	arr[ord(i) - 97] += 1
if n == 1:
	print('YES')
	exit()
else:
	for i in arr:
		if i >= 2:
			print('YES')
			exit()
print('NO')


(n, k) = (int(input()), len(set(input())))
print(('No', 'Yes')[n > k or k == 1])


a = int(input())
l = list(input())
if len(set(l)) != a or a == 1:
	print('YES')
else:
	print('NO')


dog_count = int(input())
dog_color = input()
dog_color_list = list(dog_color)
color_table = [0] * 27
num_a = ord('a')
for color in dog_color_list:
	idx = ord(color) - num_a
	color_table[idx] = color_table[idx] + 1
is_possible = False
color_diverse = 0
for c in color_table:
	if c <= 0:
		continue
	else:
		color_diverse = color_diverse + 1
		if c == 1:
			continue
		else:
			is_possible = True
			break
if color_diverse <= 1:
	print('Yes')
elif is_possible:
	print('Yes')
else:
	print('No')


for i in range(1):
	n = int(input())
	s = str(input())
	if len(s) == 1:
		print('Yes')
		exit(0)
	x = set(s)
	if len(x) < len(s):
		print('Yes')
	else:
		print('No')


n = int(input())
s = input()
l = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
if len(s) == 1:
	print('Yes')
	exit(0)
for x in s:
	l[ord(x) - ord('a')] += 1
for x in l:
	if x >= 2:
		print('Yes')
		exit(0)
print('No')


import collections
n = int(input())
a = input()
a = list(a)
d = collections.Counter(a)
flag = 0
for i in a:
	if d[i] > 1:
		flag = 1
		break
if flag == 1:
	print('Yes')
elif n == 1:
	print('Yes')
else:
	print('No')


from collections import Counter
x = int(input())
s = input()
c = Counter(s)
if c.most_common(1)[0][1] > 1 or x == 1:
	print('Yes')
else:
	print('No')


def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(mi())
from collections import Counter
n = ii()
s = input().strip()
c = Counter(s)
f = [y for (x, y) in c.items()]
ok = len(f) == 1 or f.count(1) < len(f)
print('Yes' if ok else 'No')


n = map(int, input().split())
a = input()
b = set(a)
if max(map(a.count, b)) == 1 and len(b) > 1:
	print('No')
else:
	print('Yes')


n = int(input())
s = input()
flag = 0
if n == 1:
	print('Yes')
else:
	for i in s:
		if s.count(i) >= 2:
			flag = 1
			print('Yes')
			break
	if flag == 0:
		print('No')


n = input()
s = input()
d = []
y = 'No'
for k in s:
	if k in d or len(s) == 1:
		y = 'Yes'
		break
	else:
		d.append(k)
print(y)


from collections import Counter
n = int(input())
dogs = input()
if n == 1:
	print('Yes')
else:
	c = Counter(dogs)
	if max(c.values()) >= 2:
		print('Yes')
	else:
		print('No')


import sys
n = input()
a = input()
count = [0] * 26
diff = set(a)
for c in a:
	count[ord(c) - ord('a')] += 1
if len(diff) == 1:
	print('Yes')
else:
	for c in count:
		if c >= 2:
			print('Yes')
			return
	print('No')


arr = [0 for x in range(26)]
n = int(input())
s = str(input())
for letter in s:
	arr[ord(letter) - ord('a')] += 1
flag = False
for x in arr:
	if x >= 2:
		flag = True
		break
if flag or len(s) == 1:
	print('Yes')
else:
	print('NO')


n = int(input())
d = input()
dic = {}
boo = True
for i in range(n):
	if d[i] in dic:
		print('Yes')
		boo = False
		break
	else:
		dic[d[i]] = 1
if n == 1:
	print('Yes')
elif boo:
	print('No')


n = int(input())
if n == 1:
	print('Yes')
else:
	m = input()
	check = False
	listcheck = []
	for i in m:
		if i not in listcheck:
			listcheck.append(i)
		else:
			check = True
			break
	print('Yes' if check else 'No')


n = int(input())
a = input()
K = [0] * 26
for i in range(n):
	K[ord(a[i]) - ord('a')] += 1
ans = 'No'
for i in range(26):
	if K[i] >= 2:
		ans = 'Yes'
		break
if n == 1:
	ans = 'Yes'
print(ans)


n = int(input())
s = input()
lib = {}
currmax = 1
for i in range(len(s)):
	if s[i] in lib:
		lib[s[i]] += 1
		currmax = lib[s[i]]
	else:
		lib[s[i]] = 1
if len(s) == 1:
	print('Yes')
elif currmax < 2:
	print('No')
else:
	print('Yes')


x = int(input())
a = list(input())
if len(a) == 1:
	print('Yes')
elif len(set(a)) == x:
	print('No')
else:
	print('Yes')


from collections import Counter
n = int(input())
r = input()
if n == 1:
	print('Yes')
	return
d = Counter(r)
for i in d:
	if d[i] >= 2:
		print('Yes')
		return
print('No')


a = int(input())
s = input()
d = {}
for c in s:
	if c in d.keys():
		d[c] += 1
	else:
		d[c] = 1
b = False
for v in d.values():
	if v > 1:
		b = True
if len(s) == 1:
	b = True
if b:
	print('YES')
else:
	print('NO')


n = int(input())
if n == 1:
	print('Yes')
	exit()
s = input()
dic = {}
for i in range(n):
	if s[i] not in dic:
		dic[s[i]] = 0
	dic[s[i]] += 1
check = any((dic[a] > 1 for a in dic))
if check:
	print('Yes')
else:
	print('No')


from collections import Counter

def solve():
	n = int(input())
	s = input().strip()
	d = Counter(s)
	if any([x > 1 for x in d.values()]) or len(d) == 1:
		print('Yes')
	else:
		print('No')
solve()


a = int(input())
b = list(input())
b.sort()
d = 0
c = ['aa', 'bb', 'cc', 'dd', 'ee', 'ff', 'gg', 'hh', 'ii', 'jj', 'kk', 'll', 'mm', 'nn', 'oo', 'pp', 'rr', 'ss', 'tt', 'ww', 'vv', 'qq', 'uu', 'xx', 'yy', 'zz']
if a > 1:
	for i in range(a - 1):
		if b[i] + b[i + 1] in c:
			d = 1
			break
	if d == 1:
		print('Yes')
	else:
		print('No')
else:
	print('Yes')


n = int(input())
s = input()
a = 0
if len(s) == 1:
	print('Yes')
else:
	for i in set(s):
		if s.count(i) != 1:
			a += 1
	if a != 0:
		print('Yes')
	else:
		print('No')


n = int(input())
s = input()
if n == 1:
	print('Yes')
else:
	fin = [0] * 26
	t = -1
	for i in range(n):
		temp = ord(s[i]) - ord('a')
		fin[temp] += 1
		if fin[temp] == 2:
			t = 1
			break
	if t == 1:
		print('Yes')
	else:
		print('No')


input()
S = input()
if len(set(list(S))) == len(S) and len(S) != 1:
	print('No')
else:
	print('Yes')


n = int(input())
s = input()
d = {}
for i in s:
	d[i] = d.get(i, 0) + 1
ok = False
for i in d:
	if d[i] > 1:
		ok = True
		break
if not ok and n != 1:
	print('No')
else:
	print('Yes')


num1 = int(input())
str = input()
e = set(list(str))
if len(e) < num1 or len(e) == 1:
	print('YES')
else:
	print('NO')


n = int(input())
s = input()
d = dict()
st = set(s)
for i in s:
	if i not in d:
		d[i] = 1
	else:
		d[i] += 1
l = []
for i in d.values():
	if i > 1:
		l.append(i)
if len(list(st)) == 1:
	print('YES')
elif l == []:
	print('NO')
else:
	print('YES')


def main():
	list = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
	a = input()
	st = input()
	if len(st) == 1:
		print('Yes')
	else:
		flag = 0
		for i in list:
			k = st.count(i)
			if k > 1:
				print('Yes')
				flag = 1
				break
		if flag == 0:
			print('No')
main()


n = int(input())
s = input()
l = []
c = 0
if n != 1:
	for i in range(n):
		l.append(s[i])
	for i in range(n - 1):
		for j in range(i + 1, n):
			if l[i] == l[j]:
				c = 1
				break
	if c == 1:
		print('Yes')
	else:
		print('No')
else:
	print('Yes')


n = int(input())
s = str(input())
dic = {}
flag = False
for i in range(n):
	if s[i] in dic:
		flag = True
		break
	else:
		dic[s[i]] = 1
if flag or len(s) == 1:
	print('Yes')
else:
	print('No')


n = int(input())
colors = list(input())
uniqueColors = set(colors)
if len(colors) == len(uniqueColors) and len(colors) > 1:
	print('No')
else:
	print('Yes')


n = int(input())
s = input()
count = 0
if len(set(s)) == 1:
	print('Yes')
else:
	for i in range(0, n):
		if s.count(s[i]) >= 2:
			count += 1
		if count == 1:
			break
	if count != 0:
		print('Yes')
	elif count == 0:
		print('No')


n = int(input())
c = list(input())
c1 = list(set(c))
if n == 1:
	print('Yes')
else:
	a = []
	for i in c1:
		a.append(c.count(i))
	a.sort()
	if a[len(a) - 1] >= 2:
		print('Yes')
	else:
		print('No')


n = int(input())
s = input()
d = {chr(i + 97): 0 for i in range(26)}
if len(set(s)) == n and n != 1:
	print('No')
else:
	print('Yes')


n = int(input())
s = input()
if len(set(s)) == 1:
	print('YES')
	exit()
for i in range(n):
	if s.count(s[i]) > 1:
		print('YES')
		exit()
print('NO')


n = int(input())
s = input()
a = set(s)
c = 0
if n == 1 or len(a) == 1:
	print('Yes')
else:
	for e in a:
		if s.count(e) > 1:
			c = 1
			break
	if c == 1:
		print('Yes')
	else:
		print('No')


3
n = int(input())
s = input()
if n == 1:
	print('Yes')
	return
was = set()
for c in s:
	if c in was:
		print('Yes')
		return
	was.add(c)
print('No')


n = int(input())
s = input()
c = [0] * 26
for i in s:
	c[ord(i) - ord('a')] += 1
flag = 0
an = 0
for i in range(26):
	if c[i] > 1:
		flag = 1
if flag == 1 or n == 1:
	print('Yes')
else:
	print('No')


import sys
n = int(input())
a = input()
a = list(a)
b = list(set(a))
k = []
if len(b) == 1:
	print('Yes')
	sys.exit()
for i in range(len(b)):
	k.append(a.count(b[i]))
if max(k) > 1:
	print('Yes')
else:
	print('No')


def main():
	n = int(input())
	puppies = dict.fromkeys(input())
	print('NO' if 1 < n == len(puppies) else 'YES')
main()


n = int(input())
colors = list(input())
colors.sort()
deuCerto = False
if colors[0] == colors[-1]:
	print('Yes')
else:
	for i in range(len(colors) - 1):
		if colors[i] == colors[i + 1]:
			deuCerto = True
			break
	if deuCerto:
		print('Yes')
	else:
		print('No')


n = int(input())
s = input()
s = sorted(s)
letter_count = 1
for i in range(1, len(s)):
	if s[i] != s[i - 1]:
		letter_count += 1
if n == 1:
	print('Yes')
elif n > letter_count:
	print('Yes')
else:
	print('No')


num = input()
list1 = list(input())

def f(x):
	if len(x) == 1:
		return 'YES'
	for i in x:
		if x.count(i) > 1:
			return 'YES'
	return 'NO'
print(f(list1))


n = int(input())
a = str(input())
arr = list(a)
lst = []
for i in range(26):
	lst.append(0)
for i in range(n):
	temp = ord(arr[i])
	temp -= 97
	lst[temp] += 1
flag = 0
for i in lst:
	if i >= 2:
		flag += 1
if n == 1:
	flag = 1
if flag == 0:
	print('No')
else:
	print('Yes')


from collections import defaultdict
d = defaultdict(lambda : 0)
n = int(input())
s = input()
for x in s:
	d[x] += 1
print('Yes' if max(d.values()) >= 2 or n == 1 else 'No')


a = int(input())
l = input()
mark = [0 for i in range(26)]
for e in l:
	mark[ord(e) - 97] += 1
flag = False
for e in mark:
	if e > 1:
		flag = True
if flag or a == 1:
	print('Yes')
else:
	print('No')


from collections import Counter
N = int(input())
s = input()
if len(s) == 1:
	print('Yes')
else:
	d = dict(Counter(s))
	for (k, v) in d.items():
		if v != 1:
			print('Yes')
			break
	else:
		print('No')


n = int(input())
s = input()
if n > 1:
	hm = {}
	check = False
	for ch in s:
		hm[ch] = hm.get(ch, 0) + 1
		if hm[ch] > 1:
			check = True
			break
	print('Yes' if check else 'No')
else:
	print('Yes')


from collections import Counter
n = int(input())
puppy = input()
cow = Counter(puppy)
foo = cow.most_common()
ele = foo[0][1]
if ele >= 2:
	print('YES')
elif len(puppy) == 1:
	print('YES')
else:
	print('NO')


_ = input()
s = input()
print('YES' if len(s) == 1 or len(set(s)) != len(s) else 'NO')


n = int(input())
s = input()
colors = set()
ans = 'No' if n > 1 else 'Yes'
for c in s:
	if c in colors:
		ans = 'Yes'
		break
	colors.add(c)
print(ans)


from collections import Counter
readInt = lambda : int(input().strip())
readArray = lambda : list(map(int, input().strip().split()))
n = readInt()
s = input()
if len(s) == 1:
	print('YES')
	exit()
c = Counter(s)
ans = 'NO'
for cc in c:
	if c[cc] > 1:
		ans = 'YES'
		break
print(ans)


n = int(input())
s = input()
print('Yes' if n == 1 or n > 26 or len(set(s)) != n else 'No')


from collections import Counter
n = int(input())
s = input()
if len(s) == 1:
	print('Yes')
elif Counter(s).most_common(1)[0][1] > 1:
	print('Yes')
else:
	print('No')


n = int(input())
s = input()

def fu(n, s):
	if n == 1:
		return 'Yes'
	else:
		for i in range(n):
			if s[i] in s[:i] + s[i + 1:]:
				return 'Yes'
		return 'No'
print(fu(n, s))


n = int(input())
l = list(input())
s = set(l)
if n > 26:
	print('Yes')
elif n == len(s) and n != 1:
	print('No')
else:
	print('Yes')


import sys
a = input()
a = input()
count = [0] * 26
for i in a:
	count[ord(i) - ord('a')] += 1
if max(count) >= 2 or len(a) == 1:
	print('Yes')
else:
	print('No')


import os
import sys
import math

def main():
	n = int(input())
	s = input()
	assert len(s) == n
	if n > 26:
		print('Yes')
		sys.exit(0)
	elif n == 1:
		print('Yes')
		sys.exit(0)
	a = {}
	for i in s:
		a[i] = 0
	for i in s:
		a[i] += 1
	for i in a:
		if a[i] > 1:
			print('Yes')
			sys.exit(0)
	print('No')
main()


n = int(input())
num_f = {}
st = input()
pode = False
for c in st:
	if c in num_f:
		num_f[c] += 1
		pode = True
		break
	else:
		num_f[c] = 1
if pode or n == 1:
	print('Yes')
else:
	print('No')


n = int(input())
s = input()
c = 0
l = list(set(s))
if n == 1:
	print('YES')
else:
	for i in l:
		d = s.count(i)
		if d >= 2:
			c = c + 1
	if c == 0:
		print('NO')
	else:
		print('YES')


from collections import Counter

def solve(s):
	n = len(s)
	c = Counter(s)
	return any((cnt > 1 for (l, cnt) in c.items())) or n == 1
n = int(input())
s = input().strip()
print('Yes' if solve(s) else 'No')


n = int(input())
cnt = [0] * 26
s = input()
for c in s:
	cnt[ord(c) - ord('a')] += 1
for u in cnt:
	if u > 1:
		print('Yes')
		exit()
if cnt.count(0) == 25:
	print('Yes')
else:
	print('No')


IL = lambda : list(map(int, input().split()))
n = int(input())
s = input()
print('Yes' if len(s) != len(set(s)) or len(s) == 1 else 'No')


n = int(input())
s = input()
a = dict()
f = 0
for i in range(n):
	if s[i] in a:
		f = 1
		a[s[i]] += 1
		break
	else:
		a[s[i]] = 1
if f == 1 or n == 1:
	print('Yes')
else:
	print('No')


n = int(input())
s = input()
freq = {}
for x in s:
	freq[x] = freq.get(x, 0) + 1
if n == 1 or max(freq.values()) > 1:
	print('Yes')
else:
	print('No')


n = int(input())
s = input()
a = ord('a')
cnt = [0] * 26
for ch in s:
	cnt[ord(ch) - a] += 1
c = 0
for elem in cnt:
	if elem > 1:
		c += 1
if c > 0 or n == 1:
	print('Yes')
else:
	print('No')


def main():
	n = int(input())
	a = list(input())
	b = list(set(a))
	c = [a.count(i) for i in b]
	if max(c) > 1 or len(a) == 1:
		print('Yes')
	else:
		print('No')
main()


n = int(input())
s = input()
if n == 1:
	print('Yes')
else:
	L = [0] * 26
	for i in s:
		L[ord(i) - ord('a')] += 1
	f = 1
	for i in range(26):
		if L[i] >= 2:
			f = 0
			break
	print('YNeos'[f::2])


from collections import Counter
n = int(input())
s = input()
if n == 1:
	print('Yes')
	exit(0)
for count in Counter(s).values():
	if count > 1:
		print('Yes')
		exit(0)
print('No')


n = int(input())
s = input()
print('Yes' if n < 2 or any((s.count(i) > 1 for i in set(s))) else 'No')


n = int(input())
s = input()
if n == 1:
	print('Yes')
	exit()
cnt = [0] * 26
for i in s:
	cnt[ord(i) - ord('a')] += 1
for i in range(26):
	if cnt[i] > 1:
		print('Yes')
		break
else:
	print('No')


def answer(s, n):
	if len(s) == 1:
		print('YES')
		return
	for i in range(1, n):
		if s[i] in s[:i]:
			print('YES')
			return
	print('NO')
	return
n = int(input())
s = input()
answer(s, n)


a = int(input())
t = list(input())
if a < 2:
	print('YES')
elif len(set(t)) == a:
	print('NO')
elif len(set(t)) + 1 <= a:
	print('YES')


def can_standardize(colors, n):
	if n == 1:
		return 'Yes'
	not_enough_to_recolor = 0
	for i in colors:
		if 0 < i < 2:
			not_enough_to_recolor += 1
	return 'Yes' if not_enough_to_recolor < n else 'No'
(n, s) = (int(input()), input())
colors = [0] * 26
for c in s:
	colors[ord(c) - 97] += 1
print(can_standardize(colors, n))


rez = 0
a = [0] * 26
n = input()
s = input()
for elem in s:
	i = ord(elem) - ord('a')
	a[i] += 1
	if a[i] >= 2:
		rez = 1
if rez == 1 or n == '1':
	print('Yes')
else:
	print('No')


n = int(input())
(counts, colors) = (dict(), list(input()))
for x in colors:
	counts[x] = counts.get(x, 0) + 1
if any([y > 1 for y in counts.values()]) or len(colors) == 1:
	print('Yes')
else:
	print('No')


n = int(input())
s = input()
s = sorted(s)
z = 0
for i in range(0, n - 1):
	if s[i] == s[i + 1]:
		z = 1
		break
	else:
		continue
if n == 1 or z == 1:
	print('YES')
else:
	print('NO')


n = int(input())
s = input()
ans = 0
if n == 1 or n > 26:
	ans = 1
else:
	u = [0] * 26
	m = len(s)
	for i in range(min(27, m)):
		j = ord(s[i]) - 97
		u[j] += 1
	for i in u:
		if i > 1:
			ans = 1
			break
if ans:
	print('Yes')
else:
	print('No')


from collections import Counter
n = int(input())
k = input()
print(['Yes', 'No'][n != 1 and all(map(lambda x: x == 1, Counter(k).values()))])


n = input()
s = list(input())
if len(s) == 1:
	print('Yes')
else:
	se = set(s)
	tr = False
	for i in se:
		if s.count(i) > 1:
			tr = True
	if tr:
		print('Yes')
	else:
		print('No')


def func(s):
	for i in range(26):
		x = chr(97 + i)
		if s.count(x) >= 2:
			return 1
	return 0
n = int(input())
s = input()
if func(s) or len(s) == 1:
	print('Yes')
else:
	print('No')


n = int(input())
s = sorted(list(input()))
val = 0
for i in range(n - 1):
	if s[i] == s[i + 1]:
		print('Yes')
		val = 1
		break
if n == 1:
	print('Yes')
elif val == 0:
	print('No')


n = int(input())
s = input()
d = {}
c = 0
for i in s:
	if i not in d:
		d[i] = 1
	else:
		d[i] += 1
for i in d.values():
	if i > 1:
		c += 1
if c > 0 or n == 1:
	print('YES')
else:
	print('NO')


import sys
import math
from collections import defaultdict, deque
import _operator
input = sys.stdin.readline

def inar():
	return [int(el) for el in input().split()]

def main():
	n = int(input())
	st = input()
	if n == 1:
		print('Yes')
		exit()
	dic = defaultdict(int)
	for i in range(n):
		dic[st[i]] += 1
	if max(dic.values()) >= 2:
		print('Yes')
	else:
		print('No')
main()


n = int(input())
s = input()
s1 = 'No'
for i in range(n - 1):
	for j in range(i + 1, n):
		if s[i] == s[j]:
			break
	if s[i] == s[j]:
		s1 = 'Yes'
		break
if n == 1:
	s1 = 'Yes'
print(s1)


n = int(input())
s = input()
l = list(s)
l.sort()
if n == 1:
	print('YES')
else:
	i = 0
	count = 0
	while i < n:
		a = l.count(s[i])
		if a != 1:
			count += 1
			break
		else:
			i += 1
	if count == 1:
		print('YES')
	else:
		print('NO')


from collections import Counter
n = int(str(input()))
s = str(input())
cnt = Counter(s)
is_moved = True
while is_moved:
	is_moved = False
	for (c, v) in cnt.items():
		if v >= 2:
			for (c2, v2) in cnt.items():
				if v2 == 1:
					cnt[c2] += v
					cnt[c] = 0
					is_moved = True
if n == 1 or all((v != 1 for v in cnt.values())):
	print('Yes')
else:
	print('No')


x = int(input())
a = list(input())
b = [a.count(i) for i in set(a)]
print('YES' if max(b) >= 2 or x == 1 else 'NO')


from collections import defaultdict
input()
a = input()
if len(a) == 1:
	print('YES')
	exit()
unique = defaultdict(int)
for char in a:
	unique[char] += 1
for x in unique:
	if unique[x] > 1:
		print('YES')
		exit()
print('NO')


n = int(input())
s = str(input())
d = set(s)
flag = 0
for i in d:
	if s.count(i) >= 2:
		flag = 1
		break
if len(s) == 1:
	print('Yes')
elif flag > 0:
	print('Yes')
else:
	print('No')


n = int(input())
s = list(map(ord, input()))
a = [0 for i in range(26)]
for i in s:
	a[i - 97] += 1
x = a.count(0)
if n > 1 and a.count(1) + x == 26:
	print('NO')
else:
	print('YES')


def main(dogs):
	out = 'No'
	prelist = list(dogs)
	st = set(prelist)
	if len(st) == 1:
		out = 'Yes'
	if len(prelist) - len(st) > 0:
		out = 'Yes'
	return out
dogs2 = input()
dogs = input()
print(main(dogs))


from collections import Counter
_ = input()
S = input()
C = Counter(S)
ans = any((v >= 2 for v in Counter(S).values())) or len(S) == 1
print('Yes' if ans else 'No')


n = int(input())
s = input()
print(('No', 'Yes')[any((n == 1 or n > 26 or len(set(s)) != n for i in range(1)))])


n = input()
if n == '1':
	print('Yes')
	exit(0)
s = input()
alph = 'abcdefghijklmnopqrstuvwxyz'
alph_col = [0 for i in range(26)]
for i in s:
	alph_col[alph.index(i)] += 1
good = False
for i in alph_col:
	if i > 1:
		print('Yes')
		exit(0)
print('No')


input()
s = input()
for i in 'abcdefghijklmnopqrstuvwxyz':
	if i in s and s.count(i) > 1:
		print('Yes')
		exit(0)
print('No' if len(s) > 1 else 'Yes')


from collections import Counter
n = input()
s = input()
a = [i for i in s]
cnt = Counter(a)
for j in cnt.values():
	if j > 1:
		print('Yes')
		exit(0)
if n == '1':
	print('Yes')
else:
	print('No')


n = int(input())
s = input()
a = set([ch for ch in s])
if len(s) - len(a) >= 1 or len(a) == 1:
	print('Yes')
else:
	print('No')


from collections import Counter
n = int(input())
print('Yes' if n == 1 or max(Counter(input()).values()) >= 2 else 'No')


n = int(input())
l = sorted(list(input()))
for i in range(n):
	if l[i - 1] == l[i]:
		print('YES')
		break
else:
	print('NO')


n = input()
a = input()
b = set(a)
flag = True
if len(a) == 1:
	print('Yes')
	flag = False
else:
	for i in b:
		if a.count(i) >= 2:
			print('Yes')
			flag = False
			break
if flag:
	print('No')


n = int(input())
s = input()
x = sorted(list(s))
check = 0
for i in range(1, n):
	if x[i] == x[i - 1]:
		check = 1
if check == 1 or n == 1:
	print('Yes')
else:
	print('No')


from collections import Counter
n = int(input())
s = input()
c = Counter(list(s))
if c.most_common(1)[0][1] == 1 and len(s) > 1:
	print('No')
else:
	print('Yes')


from collections import *
a = int(input())
flag = 0
b = input()
D = Counter(b)
if max(D.values()) < 2 and len(b) != 1:
	flag = 1
if flag == 1:
	print('No')
else:
	print('Yes')


n = int(input())
s = input()
if n == 1:
	print('Yes')
	exit()
a = [x for x in s]
a.sort()
for i in range(n - 1):
	if a[i] == a[i + 1]:
		print('Yes')
		exit()
print('No')


3

def solve(N, S):
	cnt = [0] * 26
	for c in S:
		cnt[ord(c) - ord('a')] += 1
	colors = len([c for c in cnt if c > 0])
	if colors == 1:
		return True
	return max(cnt) >= 2

def main():
	N = int(input())
	S = input()
	print('Yes' if solve(N, S) else 'No')

def __starting_point():
	main()
__starting_point()


b = int(input())
a = list(input())
if b == len(set(a)) and b != 1:
	print('NO')
else:
	print('YES')


n = int(input())
s = list(input())
a = []
d = 0
for x in s:
	if x not in a:
		a.append(x)
if len(s) == 1:
	print('YES')
else:
	for x in a:
		r = s.count(x)
		if r >= 2:
			d = d + 1
	if d > 0:
		print('YES')
	else:
		print('NO')


t = int(input())
s = list(input())
x = set(s)
if len(x) == len(s) and len(s) != 1:
	print('No')
else:
	print('Yes')


n = int(input())
d = dict()
for i in input():
	d[i] = d.get(i, 0) + 1
	if n == 1 or d[i] == 2:
		print('Yes')
		exit()
print('No')


i = int(input())
letters = [c for c in input()]
print('YES' if sorted([letters.count(c) for c in set(letters)], reverse=True)[0] >= 2 or i == 1 else 'NO')


input()
li = list(input())
if len(li) == len(set(li)) and len(li) > 1:
	print('NO')
else:
	print('YES')


n = int(input())
s = input()
a = {}
if n == 1:
	print('YES')
	exit()
for i in s:
	if i in a:
		a[i] += 1
	else:
		a[i] = 1
for i in a:
	if a[i] > 1:
		print('YES')
		exit()
print('NO')


def main():
	n = int(input())
	st = str(input())
	st = sorted(st)
	x = int(1)
	ans = ''
	if n > 1:
		ans = 'No'
	else:
		ans = 'Yes'
	for i in range(1, len(st)):
		if st[i] == st[i - 1]:
			x += 1
		else:
			x = 1
		if x > 1:
			ans = 'Yes'
			break
	print(ans)
main()


from sys import stdin
n = int(stdin.readline())
a = [0] * 26
s = stdin.readline().rstrip()
if n == 1:
	print('Yes')
	exit()
for i in range(n):
	a[ord(s[i]) - ord('a')] = a[ord(s[i]) - ord('a')] + 1
for i in range(26):
	if a[i] >= 2:
		print('Yes')
		exit()
print('No')


import sys
import math
import bisect
import itertools

def main():
	n = int(input())
	s = set(list(input()))
	if len(s) == 1 or len(s) < n:
		print('Yes')
	else:
		print('No')
main()


x = int(input())
str = input()
t = 0
if len(str) == 1:
	exit(print('YES'))
d = {i: [0] for i in 'abcdefghijklmnopqrstuvwxyz'}
for i in d:
	d[i] = str.count(i)
	if d[i] > 1:
		t = 1
		break
if 1 == t:
	print('YES')
else:
	print('NO')


import functools
import time
from collections import Counter

def timer(func):

	@functools.wraps(func)
	def wrapper(*args, **kwargs):
		stime = time.perf_counter()
		res = func(*args, **kwargs)
		elapsed = time.perf_counter() - stime
		print(f'{func.__name__} in {elapsed:.4f} secs')
		return res
	return wrapper

class solver:

	def __init__(self):
		pass

	def __call__(self):
		n = int(input())
		if n == 1:
			print('Yes')
			exit(0)
		s = list(input().strip())
		h = [0] * 26
		for x in s:
			h[ord(x) - ord('a')] += 1
		for i in range(26):
			if h[i] > 1:
				print('Yes')
				exit(0)
		print('No')
solver()()


n = int(input())
s = list(input())
if n == 1:
	print('Yes')
	return
for i in range(n):
	if s.count(s[i]) > 1:
		print('Yes')
		return
print('No')


n = int(input())
if n == 1:
	print('Yes')
	exit()
arr = input()
was = [0 for i in range(100)]
for i in arr:
	j = ord(i) - ord('a')
	if was[j] == 1:
		print('Yes')
		exit()
	was[j] = 1
print('No')


n = int(input())
s = input()
if len(s) == 1:
	print('Yes')
	exit()
m = {}
for i in s:
	if i in m:
		print('Yes')
		exit()
	else:
		m[i] = 1
print('No')


n = int(input())
s = input()
l = list(s)
ss = set(s)
ls = list(ss)
y = 0
for i in range(len(ls)):
	if l.count(ls[i]) >= 2:
		print('Yes')
		y = 1
		break
	elif n == 1:
		print('Yes')
		y = 1
	else:
		pass
if y == 0:
	print('No')


n = int(input())
lst = list(input())
st = set(lst)
if n == 1:
	print('YES')
elif len(lst) == len(st):
	print('No')
else:
	print('Yes')


n = int(input())
s = input()
d = [0] * 30
ans = False
if len(s) == 1:
	ans = True
else:
	for c in s:
		k = ord(c) - ord('a')
		if d[k] == 0:
			d[k] = 1
		else:
			ans = True
			break
if ans:
	print('YES')
else:
	print('NO')


n = int(input())
z = input()
x = True
for i in z:
	if z.count(i) > 1:
		x = True
		break
	else:
		x = False
if n == 1:
	x = True
print('YES' if x else 'NO')


import collections
n = int(input())
if n == 1:
	print('YES')
	exit(0)
s = input()
d = collections.Counter()
for i in s:
	d[i] += 1
if max(d.values()) >= 2:
	print('YES')
else:
	print('NO')


n = int(input())
s = input().strip()
arr = []
for i in range(26):
	arr.append(0)
for i in s:
	arr[ord(i) - 97] += 1
flag = 1
if n == 1:
	print('Yes')
else:
	for i in range(26):
		if arr[i] != 0:
			if arr[i] != 1:
				print('Yes')
				flag = 0
				break
	if flag == 1:
		print('No')


import functools
x = input()
sequence = input()
sequence = ''.join(sorted(sequence))
previous_char = None
is_possible = False
if len(sequence) == 1:
	print('YES')
else:
	for char in sequence:
		if char == previous_char:
			is_possible = True
			break
		previous_char = char
	if is_possible:
		print('YES')
	else:
		print('NO')


from collections import Counter
n = int(input())
s = Counter(list(input()))
if len(s) == 1:
	print('YES')
elif max(s.values()) < 2:
	print('NO')
else:
	print('YES')


import re
input()
mind = False
s = input()
for x in range(len(s)):
	x1 = s[x]
	z = s[x + 1:len(s)]
	for y in z:
		if re.match(x1, y):
			mind = True
			break
	if mind == True:
		break
if len(s) == 1 or mind == True:
	print('Yes')
else:
	print('No')


n = int(input())
s = input()
char_count = dict()
m = 0
for char in s:
	if char in char_count.keys():
		char_count[char] += 1
	else:
		char_count[char] = 1
	m = max(m, char_count[char])
if m == 1 and n > 1:
	ans = 'NO'
else:
	ans = 'YES'
print(ans)


k = 0
n = int(input())
s = list(input())
a = list(set(s))
for i in a:
	if s.count(i) > 1:
		k += 1
if not k > 0 and n > 1:
	print('No')
else:
	print('Yes')


num = int(input())
pup = input()
lst = []
for i in range(num):
	lst.append(pup[i])
lst.sort()
if num > 1:
	for i in range(num):
		if i < num - 1:
			if lst[i] == lst[i + 1]:
				print('YES')
				break
	if i == num - 1:
		print('NO')
elif num == 1:
	print('YES')


n = int(input())
s = input()
a = [0] * 26
for i in range(0, len(s)):
	a[ord(s[i]) - 97] += 1
cnt = 0
for i in range(0, 26):
	if a[i] > 1:
		cnt += 1
if n == 1:
	print('Yes')
elif cnt == 0:
	print('No')
else:
	print('Yes')


n = int(input())
if n == 1:
	flag = 1
else:
	flag = 0
x = input()
m = {}
for i in x:
	m[i] = m.get(i, 0) + 1
for v in m.values():
	if v >= 2:
		flag = 1
if flag:
	print('Yes')
else:
	print('No')


n = int(input())
s = input()
c = [0] * 26
for i in s:
	c[ord(i) - ord('a')] += 1
c.sort(reverse=1)
cur = 0
f = 1
for i in c:
	if i == 1:
		if cur <= 1:
			f = 0
			break
	cur += i
if n == 1:
	f = 1
print('Yes' if f else 'No')


def main():
	n = int(input())
	a = input()
	if n == 1:
		print('Yes')
		return
	c = [0] * 300
	for i in a:
		if c[ord(i)] > 0:
			print('Yes')
			return
		c[ord(i)] += 1
	print('No')
main()


n = int(input())
s1 = input()
d1 = {}
if s1.count(s1[0]) == n:
	print('Yes')
else:
	for i in range(len(s1)):
		if s1[i] not in d1:
			d1[s1[i]] = 1
		elif s1[i] in d1:
			d1[s1[i]] += 1
	l1 = list(d1.values())
	if n - l1.count(1) > 0:
		print('Yes')
	else:
		print('No')


n = int(input())
a = input()
if n == 1:
	print('Yes')
	exit(0)
d = set()
for i in a:
	d.add(i)
if len(d) < n:
	print('Yes')
	exit(0)
print('No')


n = int(input())
s = str(input())
if len(s) == 1:
	print('YES')
else:
	k = 0
	for i in s:
		if s.count(i) >= 2:
			k = 1
			break
	if k == 0:
		print('NO')
	else:
		print('YES')


from collections import Counter
N = int(input())
s = input()
dic = Counter(s)
if len(dic) == 1:
	print('Yes')
else:
	for (key, value) in dic.items():
		if value >= 2:
			print('Yes')
			break
	else:
		print('No')


from collections import Counter
n = int(input())
c = Counter(input())
flag = False
for char in c:
	if c[char] >= 2:
		flag = True
if n == 1 or flag:
	print('Yes')
else:
	print('No')


n = int(input())
s = input()
a = [s.count(chr(i)) for i in range(ord('a'), ord('z') + 1)]
print('No' if max(a) < 2 and n > 1 else 'Yes')


from collections import Counter
hat = int(input())
lst = list(input())
x = Counter(lst)
if len(x) == 1:
	print('Yes')
	quit()
else:
	for i in x.values():
		if i > 1:
			print('Yes')
			quit()
	print('No')


import sys
from collections import defaultdict
cnt = input()
colors = input()
color_cnt = defaultdict(int)
for color in colors:
	color_cnt[color] += 1
if any((cnt > 1 for cnt in color_cnt.values())) or len(colors) == 1:
	print('Yes')
else:
	print('No')


n = int(input())
s = input()
dic = {}
max = 0
for i in s:
	if i in dic:
		dic[i] += 1
	else:
		dic[i] = 1
	if dic[i] > max:
		max = dic[i]
if max >= 2 or n == 1:
	print('Yes')
else:
	print('No')


n = int(input())
s = set(input())
if n < 2:
	print('Yes')
elif n > len(s):
	print('Yes')
else:
	print('No')


def main():
	(n, cnt) = (int(input()), [0] * 26)
	for c in map(ord, input()):
		cnt[c - 97] += 1
	print(('No', 'Yes')[n == 1 or max(cnt) > 1])
main()


n = int(input())
po = list(input())
p = list(set(po))
pa = 0
for item in p:
	if po.count(item) > 1:
		pa = 1
		break
	else:
		pass
if n == 1:
	print('Yes')
elif pa == 0:
	print('No')
else:
	print('Yes')


from collections import Counter
n = int(input())
puppies = input()
if len(set(puppies)) == 1:
	print('Yes')
	exit()
puppies = Counter(puppies)
found = False
for (k, v) in puppies.items():
	if v > 1:
		print('Yes')
		break
else:
	print('No')


n = int(input())
s = input()
m = set()
if len(s) == 1:
	print('Yes')
	exit()
for x in s:
	if x in m:
		print('Yes')
		exit()
	m.add(x)
print('No')


n = int(input())
if n == 1:
	print('Yes')
	exit(0)
a = input()
d = [0] * 26
for i in range(n):
	d[ord(a[i]) - ord('a')] += 1
for i in range(26):
	if d[i] >= 2:
		print('Yes')
		break
else:
	print('No')


from sys import stdin, stdout

def rint():
	return map(int, stdin.readline().split())
n = int(input())
s = input()
check = [0] * 26
if n == 1:
	print('Yes')
	exit()
for i in s:
	a = ord('z') - ord(i)
	if check[a]:
		print('Yes')
		exit()
	else:
		check[a] = 1
print('No')


t = 1
while t:
	t -= 1
	n = int(input())
	s = input()
	ls = [x for x in s]
	if len(s) == 1:
		print('YES')
		continue
	ans = 'NO'
	for item in set(ls):
		if ls.count(item) > 1:
			ans = 'YES'
			break
	print(ans)


n = int(input())
(s, d) = (input(), dict())
if n == 1:
	print('YES')
else:
	flag = False
	for i in range(n):
		if s[i] in d.keys():
			flag = True
			break
		else:
			d[s[i]] = 1
	if flag:
		print('YES')
	else:
		print('NO')


n = input()
s = input()
hc = {}
for c in s:
	hc[c] = hc.get(c, 0) + 1
(m2, m1) = (0, 0)
for ch in s:
	c = hc[ch]
	if c >= 2:
		m2 += 1
	else:
		m1 += 1
if len(hc) == 1 or m2 >= 1:
	print('Yes')
else:
	print('No')


i = input
print('YNeos'[int(i()) == len({*i()}) > 1::2])


from collections import defaultdict
n = int(input())
s = input()
flag = False
d = defaultdict(int)
for i in range(n):
	d[s[i]] += 1
	if d[s[i]] >= 2:
		flag = True
		break
if len(d) == 1:
	flag = True
print('Yes' if flag else 'No')


from collections import Counter
input()
s = input()
d = Counter(s)
if len(s) == 1 or any((x > 1 for x in d.values())):
	print('YES')
else:
	print('NO')


n = int(input())
s = input()
d = {}
ans = 1
if n == 1:
	print('Yes')
else:
	for i in s:
		d[i] = s.count(i)
		if d[i] >= 2:
			print('Yes')
			break
	else:
		print('No')


n = int(input())
s = input()
if n == 1:
	print('Yes')
	exit()
for i in s:
	if s.count(i) >= 2:
		print('Yes')
		exit()
print('No')


def Doggo(num, doggo):
	doggo.sort()
	count = 0
	if num == 1:
		print('Yes')
		return
	else:
		while count < len(doggo) - 1:
			if doggo[count] == doggo[count + 1]:
				print('Yes')
				return
			count += 1
		print('No')
num = int(input())
doggo = input()
list_doggo = list(doggo)
Doggo(num, list_doggo)


n = int(input())
str = input()
str = set(str)
if len(str) > 1:
	if n > len(str):
		print('Yes')
	else:
		print('No')
else:
	print('Yes')


from collections import Counter
n = input()
s = input()
if len(set(s)) == len(s) > 1:
	print('No')
else:
	print('Yes')


n = int(input())
s = input()
d = {}
for i in range(n):
	if s[i] not in d:
		d[s[i]] = 1
	else:
		d[s[i]] += 1
if max(d.values()) >= 2 or n == 1:
	print('YES')
else:
	print('NO')


_ = input()
s = input()
d = {}
for i in s:
	if i in d:
		d[i] += 1
	else:
		d[i] = 1
for i in d.values():
	if i >= 2:
		print('Yes')
		break
else:
	if len(s) == 1:
		print('Yes')
	else:
		print('No')


n = int(input())
s = input()
se = set()
for i in s:
	se.add(i)
if len(se) == n & n != 1:
	print('No')
else:
	print('Yes')


n = int(input())
s = input()
a = sorted(list(map(lambda x: s.count(x), 'abcdefghijklmnopqrstuvwxyz')))
if n == 1 or a[25] >= 2:
	print('Yes')
else:
	print('No')


print('YNeos'[int(input()) == len(set(input())) > 1::2])


def sobachki(s):
	if len(s) == 1 or all((x == s[0] for x in s)):
		return 'Yes'
	for elem in s:
		if s.count(elem) >= 2:
			return 'Yes'
	return 'No'
n = int(input())
print(sobachki(input()))


n = int(input())
l = list(input())
if n == 1:
	print('YES')
	exit()
l_set = list(set(l))
for i in l_set:
	if l.count(i) > 1:
		print('YES')
		exit()
print('NO')


def main():
	n = int(input())
	s = input()
	dic = {}
	for char in s:
		if char not in dic:
			dic[char] = 1
		else:
			dic[char] += 1
	if n == 1:
		print('Yes')
	elif len(dic) == n:
		print('No')
	else:
		print('Yes')
main()


n = int(input())
s = list(input())
if n == 1:
	print('Yes')
	exit(0)
for el in set(s):
	if s.count(el) >= 2:
		print('Yes')
		exit(0)
print('No')


n = int(input())
s = input()
s = ''.join(sorted(s))
a = []
x = s[0]
s1 = s + 'aa'
y = 0
z = 0
for i in range(n + 1):
	if x == s1[i]:
		y += 1
	if y >= 2:
		z = 1
		break
	if s1[i] != x:
		x = s1[i]
		a.append(y)
		y = 1
if z == 1:
	print('Yes')
elif z == 0 and n == 1:
	print('Yes')
else:
	print('No')


from collections import Counter
n = int(input())
s = input()
c = list(Counter(s).values())
if max(c) >= 2 or len(s) == 1:
	print('Yes')
else:
	print('No')


n = int(input())
s = input()
if n == 1:
	print('YES')
else:
	for i in range(len(s)):
		if s.count(s[i]) > 1:
			print('YES')
			break
	else:
		print('NO')


n = int(input())
s = input().strip()
s1 = list(s)
s2 = list(set(s1))
if len(s1) != len(s2) or len(s1) == 1:
	print('Yes')
else:
	print('No')


from collections import Counter

def go():
	n = int(input())
	a = Counter(input())
	if n == 1:
		return 'Yes'
	for i in a.values():
		if i > 1:
			return 'Yes'
	return 'No'
print(go())


q = int(input())
print('Yes' if len(set(input())) < q or q == 1 else 'No')


n = int(input())
s = list(input())
l = set(s)
flag = 0
if n < 2:
	print('Yes')
else:
	for x in s:
		if s.count(x) != 1:
			print('Yes')
			flag += 1
			break
	if flag == 0:
		print('No')


a = input()
s = input()
import string
for ele in set(s):
	if s.count(ele) > 1:
		print('Yes')
		break
else:
	if len(set(s)) == 1:
		print('Yes')
	else:
		print('No')


n = int(input())
s = input()
a = [0] * 26
for i in s:
	a[ord(i) - 97] += 1
c = 0
for i in a:
	if i > 1:
		c = 1
		break
if c == 0 and n != 1:
	print('No')
else:
	print('Yes')


import os
import sys
from io import BytesIO, IOBase
from types import GeneratorType

def bootstrap(f, stack=[]):

	def wrappedfunc(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		else:
			to = f(*args, **kwargs)
			while True:
				if type(to) is GeneratorType:
					stack.append(to)
					to = next(to)
				else:
					stack.pop()
					if not stack:
						break
					to = stack[-1].send(to)
			return to
	return wrappedfunc
from collections import defaultdict
from math import sqrt
INF = pow(2, 63)

def isPrime(number):
	assert isinstance(number, int) and number >= 0, "'number' must been an int and positive"
	status = True
	if number <= 1:
		status = False
	for divisor in range(2, int(round(sqrt(number))) + 1):
		if number % divisor == 0:
			status = False
			break
	assert isinstance(status, bool), "'status' must been from type bool"
	return status

def primeFactorization(number):
	assert isinstance(number, int) and number >= 0, "'number' must been an int and >= 0"
	ans = []
	factor = 2
	quotient = number
	if number == 0 or number == 1:
		ans.append(number)
	elif not isPrime(number):
		while quotient != 1:
			if isPrime(factor) and quotient % factor == 0:
				ans.append(factor)
				quotient /= factor
			else:
				factor += 1
	else:
		ans.append(number)
	assert isinstance(ans, list), "'ans' must been from type list"
	return ans

def solveb(n, tuparr):
	pset = set(primeFactorization(tuparr[0][0])) | set(primeFactorization(tuparr[0][0]))
	tupprimes = []
	for tup in tuparr:
		tupprimes.append(set(primeFactorization(tup[0])) | set(primeFactorization(tup[1])))
	for p in pset:
		cnt = 0
		for (i, arrpset) in enumerate(tupprimes):
			if p not in arrpset:
				break
			else:
				cnt += 1
		if cnt == n:
			return p
	return -1

def solve(n, arr):
	m = defaultdict(int)
	for c in arr:
		m[c] += 1
	if max(m.values()) <= 1 and n != 1:
		print('No')
	else:
		print('Yes')

@bootstrap
def rec(i, k, arr, mp, f=0):
	pass

def main():
	n = int(input().strip())
	s = input().strip()
	ans = solve(n, s)
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
import os, sys
from io import IOBase, BytesIO
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.getvalue())
			(self.truncate(0), self.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			self.write = lambda s: self.buffer.write(s.encode('ascii'))
			self.read = lambda : self.buffer.read().decode('ascii')
			self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline()
import sys

class ostream:

	def __lshift__(self, a):
		sys.stdout.write(str(a))
		return self
cout = ostream()
endl = '\n'

def readnumbers(zero=0):
	conv = ord if py2 else lambda x: x
	A = []
	numb = zero
	sign = 1
	i = 0
	s = sys.stdin.buffer.read()
	try:
		while True:
			if s[i] >= b'0'[0]:
				numb = 10 * numb + conv(s[i]) - 48
			elif s[i] == b'-'[0]:
				sign = -1
			elif s[i] != b'\r'[0]:
				A.append(sign * numb)
				numb = zero
				sign = 1
			i += 1
	except:
		pass
	if s and s[-1] >= b'0'[0]:
		A.append(sign * numb)
	return A
main()


from collections import defaultdict
n = int(input())
s = input()
if n == 1:
	print('Yes')
	exit()
b = defaultdict(int)
for v in s:
	b[v] += 1
for (j, i) in b.items():
	if i != 1:
		print('Yes')
		exit()
print('No')


import sys

def main():
	n = input()
	char = input()
	colors = list(char)
	if len(colors) != int(n):
		print('No')
		return
	if len(colors) == 1:
		print('Yes')
		return
	temp = {}
	for i in colors:
		if i not in temp:
			temp[i] = 1
		else:
			temp[i] += 1
	return_val = 'No'
	for color in temp:
		if temp[color] >= 2:
			return_val = 'Yes'
	print(return_val)
	return
main()


n = int(input())
s = input()
d = {}
for i in s:
	d[i] = d.get(i, 0) + 1
if max(d.values()) == 1 and n > 1:
	print('No')
else:
	print('Yes')


n = int(input())
if n > 1 and len(set(input())) == n:
	print('no')
else:
	print('yes')


import sys

def main(testing=False, debugging=False):

	def printrepl(s):
		if debugging:
			print(s)

	def noLonely(a):
		for key in a:
			if a[key] >= 2:
				printrepl("there's a pair to start changing")
				return True
		else:
			return False
	quantities = {}
	if testing:
		temp = input()
		colors = input()
	else:
		data = []
		lines = 2
		sys.stdin.readline()
		data = sys.stdin.readline()
		colors = data.strip()
	if len(colors) == 1:
		print('Yes')
		return
	for letter in colors:
		if letter in quantities:
			quantities[letter] += 1
		else:
			quantities[letter] = 1
	printrepl(quantities)
	if noLonely(quantities):
		print('Yes')
	else:
		print('No')
main(testing=False, debugging=False)


from collections import Counter

def solve(n, s):
	c = Counter(s)
	if len(s) == 1:
		return 'Yes'
	for i in c.values():
		if i > 1:
			return 'Yes'
	return 'No'

def main():
	n = int(input())
	s = input()
	print(solve(n, s))
main()


gi = lambda : list(map(int, input().split()))
n = gi()[0]
s = input()
if n > 26 or n == 1:
	print('Yes')
	exit()
if len(set(list(s))) == n:
	print('No')
else:
	print('Yes')


N = int(input())
L = list(input())
Hash = [0] * 26
FLAG = 0
for i in range(N):
	Hash[ord(L[i]) - 97] += 1
for i in range(26):
	if Hash[i] >= 2:
		FLAG = 1
		print('Yes')
		break
if N == 1:
	print('Yes')
if FLAG == 0 and N != 1:
	print('No')


n = int(input())
dog_str = input()
dog_dict = {}
count_1 = 0
count_2 = 0
for i in range(n):
	if dog_str[i] in dog_dict.keys():
		dog_dict[dog_str[i]] += 1
	else:
		dog_dict.update({dog_str[i]: 1})
for val in dog_dict.values():
	count_2 += 1
	if val == 1:
		count_1 += 1
if count_1 == count_2 and n != 1:
	print('No')
else:
	print('Yes')


import string
n = int(input(''))
group = list(input(''))
possible = False
lettres = list(string.ascii_lowercase)
for i in lettres:
	if group.count(i) >= 2:
		possible = True
if n <= 1:
	possible = True
if possible:
	print('Yes')
else:
	print('No')


n = int(input())
a = list(input())
flag = 0
b = list(set(a))
if len(a) == 1:
	flag = 1
else:
	for i in range(0, len(b)):
		d = a.count(b[i])
		if d >= 2:
			flag = 1
			break
		else:
			flag = 0
if flag:
	print('Yes')
else:
	print('No')


import string
import operator
input()
s = input()
if len(s) > 1:
	d = dict.fromkeys(string.ascii_lowercase, 0)
	for i in range(len(s)):
		d[s[i]] += 1
	if d[max(d.items(), key=operator.itemgetter(1))[0]] > 1:
		print('Yes')
	else:
		print('No')
else:
	print('Yes')


def standard(num_of_puppies, colors):
	if num_of_puppies == 1:
		return True
	puppies = [0] * 26
	for i in colors:
		puppies[ord(i) - ord('a')] += 1
	for i in puppies:
		if i >= 2:
			return True
	return False
num_of_puppies = int(input().strip())
colors = input().strip().lower()
if standard(num_of_puppies, colors):
	print('YES')
else:
	print('NO')


import string
n = input()
s = input()
print('YES' if max([s.count(c) for c in string.ascii_lowercase]) > 1 or n == '1' else 'NO')


from collections import Counter
n = int(input())
s = input()
f = Counter(s)
c = 0
for i in f:
	if f[i] >= 2:
		c += 1
		break
if c == 1 or n == 1:
	print('Yes')
else:
	print('No')


n = int(input())
s = input()
c = {}
for i in range(len(s)):
	if s[i] in c:
		c[s[i]] = c[s[i]] + 1
	else:
		c[s[i]] = 1
stats = {}
for char in c:
	if c[char] >= 2:
		if 2 in stats:
			stats[2] += 1
		else:
			stats[2] = 1
	elif 1 in stats:
		stats[1] += 1
	else:
		stats[1] = 1
if 1 in stats and stats[1] >= 2 and (2 not in stats):
	print('No')
else:
	print('Yes')


n = int(input())
s = input()
dp = [0 for i in range(30)]
for i in s:
	dp[ord(i) - 97] += 1
can = False
for i in dp:
	if i > 1:
		can = True
		break
if can or n == 1:
	print('YES')
else:
	print('NO')


n = int(input())
s = input()
d = dict()
ans = 0
for i in s:
	if d.get(i) == None:
		d[i] = 1
	else:
		ans = 1
if ans == 1 or n == 1:
	print('Yes')
else:
	print('No')


n = int(input())
a = input()
if n > 26 or n == 1:
	print('Yes')
else:
	f = 0
	a = list(map(lambda c: c, a))
	a.sort()
	for i in range(1, n):
		if a[i - 1] == a[i]:
			f = 1
			break
	if f == 1:
		print('Yes')
	else:
		print('No')


n = int(input())
s = input()
ans = []
for i in s:
	ans.append(i)
if n > 1:
	for i in ans:
		ans.remove(i)
		if i in ans:
			print('Yes')
			break
	else:
		print('No')
else:
	print('Yes')


inp = list(map(int, input().split()))
dict = {}
n = inp[0]
string = list(map(str, input().split()))[0]
answers = []
for i in string:
	if dict.get(i) is not None:
		dict[i] = dict[i] + 1
	else:
		dict[i] = 1
values = list(dict.values())
values.sort()

def isPossible(values):
	return 'YES' if len(values) == 1 or max(values) != 1 else 'NO'
print(isPossible(values))


x = [0] * 26
n = int(input())
dogs = input()
for d in dogs:
	x[ord(d) - 97] += 1
if n == 1:
	print('Yes')
else:
	for i in x:
		if i > 1:
			print('Yes')
			break
	else:
		print('No')


n = int(input())
s = input()
a = 0
if len(s) == 1:
	print('Yes')
else:
	boolean = False
	for i in set(s):
		if s.count(i) != 1:
			boolean = True
			break
	if boolean:
		print('Yes')
	else:
		print('No')


n = int(input())
s = input().strip()
print(['Yes', 'No'][n > 1 and len(set(s)) == n])


n = int(input())
st = input()
flag = 0
for i in range(n):
	if st.find(st[i], i + 1) != -1:
		flag = 1
		break
if flag == 1 or n == 1:
	print('YES')
else:
	print('NO')


n = int(input())
s = list(input())
s.sort()
j = 0
if n == 1:
	print('Yes')
else:
	for i in range(1, n):
		if s[i] == s[i - 1]:
			j = 1
			break
	if j == 1:
		print('Yes')
	else:
		print('No')


ck = [0] * 999
n = int(input())
s = input()
if len(s) > 1:
	for i in s:
		ck[ord(i)] += 1
		if ck[ord(i)] == 2:
			print('Yes')
			exit()
else:
	print('Yes')
	exit()
print('No')


n = int(input())
s = input()
alphabet = [chr(i) for i in range(97, 123)]
d = dict.fromkeys(alphabet, 0)
nopair = True
if n == 1:
	print('Yes')
else:
	for i in s:
		d[i] += 1
		if d[i] > 1:
			nopair = False
	if nopair:
		print('No')
	else:
		print('Yes')


n = int(input())
s = sorted(input())
ans = 1
for i in range(1, n):
	if s[i] != s[i - 1]:
		ans += 1
if ans == 1:
	print('Yes')
elif ans == n:
	print('No')
else:
	print('Yes')


len = int(input())
s = input()
arr = [0] * 30
for alph in s:
	arr[ord(alph) - ord('a')] += 1
b = True
for i in range(0, 26):
	if arr[i] > 1:
		b = False
print('Yes' if b == False or len == 1 else 'No')


n = int(input())
A = set(input())
if n == 1 or n > 26:
	print('Yes')
	exit()
if len(A) == n:
	print('No')
else:
	print('Yes')


charnum = int(input())
char = str(input())
if len(set(char)) != len(char) or len(char) == 1:
	print('YES')
else:
	print('NO')


from collections import defaultdict
import sys
n = int(input())
string = input()
if n == 1:
	print('Yes')
else:
	count = defaultdict(int)
	for x in string:
		count[x] += 1
	yes = False
	for x in count:
		if count[x] > 1:
			print('Yes')
			yes = True
			break
	if not yes:
		print('No')


n = int(input())
s = list(input())
alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
dct = {i: j for (i, j) in zip(alphabet, range(26))}

def countingSort(arr, dict_):
	counts = [0] * 26
	for i in arr:
		counts[dict_[i]] += 1
	return counts
many = False
res = countingSort(s, dct)
for d in range(len(res)):
	if res[d] > 1:
		many = True
		break
ans = None
if n == 1:
	ans = 'Yes'
elif many == False:
	ans = 'No'
else:
	ans = 'Yes'
print(ans)


n = int(input())
m = input()
flag = 0
ji = 0
for i in range(26):
	if m.count(chr(i + ord('a'))) == 1:
		flag += 1
	elif m.count(chr(i + ord('a'))) > 1:
		ji = 1
if flag == 1 or ji:
	print('Yes')
else:
	print('No')


z = int(input())
x = input()
d = False
for i in x:
	a = x.count(i)
	if a >= 2:
		d = True
		break
if d or len(x) == 1:
	print('Yes')
else:
	print('No')


n = int(input())
str = input()
ht = {}
OK = 0
for i in str:
	if ht.get(i, None) == None:
		ht[i] = 1
	else:
		ht[i] += 1
		OK = 1
		break
if OK or n == 1:
	print('Yes')
else:
	print('No')


def find_pair(string, len_string):
	if len_string == 1:
		return 'Yes'
	for index in range(0, len_string - 1):
		char = string[index]
		for chars in string[index + 1:]:
			if char == chars:
				return 'Yes'
	return 'No'
numberPuppies = int(input())
string = input()
print(find_pair(string, numberPuppies))


n = int(input())
s = str(input())
l = list(set(s))
z = 0
for i in l:
	t = s.count(i)
	if t >= 2 or n == 1:
		z = 1
		print('Yes')
		break
if z == 0:
	print('No')


n = int(input())
a = input()
if n == 1:
	print('Yes')
	exit(0)
d = {}
for i in a:
	if i not in d:
		d[i] = 1
	else:
		d[i] += 1
for i in d:
	if d[i] >= 2:
		print('Yes')
		exit(0)
print('No')


n = int(input())
a = input()
g = 'abcdefghijklmnopqrstuvwxyz'

def f(a):
	for i in range(26):
		if g[i] == a:
			return i
if n == 1:
	print('Yes')
else:
	chk = []
	for i in range(26):
		chk.append(0)
	for i in range(n):
		chk[f(a[i])] += 1
	flg = 1
	for i in range(26):
		if chk[i] != 1 and chk[i] != 0:
			flg = 0
	if flg:
		print('No')
	else:
		print('Yes')


n = int(input())
alh = 'qwertyuiopasdfghjklmnbvcxz'
s = input()
a = [0] * 28
for i in s:
	a[alh.index(i)] += 1
k = 0
for i in a:
	if i > 1:
		k = 1
if k == 1 or n == 1:
	print('Yes')
else:
	print('No')


import sys
import math
get_string = lambda : sys.stdin.readline().strip()
get_int_list = lambda : list(map(int, sys.stdin.readline().strip().split()))
get_intList_from_str = lambda : list(map(int, list(sys.stdin.readline().strip())))
get_charList_from_str = lambda : list(sys.stdin.readline().strip())
get_char_list = lambda : sys.stdin.readline().strip().split()
get_int = lambda : int(sys.stdin.readline())
pt = lambda x: sys.stdout.write(str(x))
n = get_int()
s = get_string()
if len(set(s)) == n and n != 1:
	print('No')
else:
	print('Yes')


n = int(input())
s = list(input())
if n == 1:
	print('Yes')
	exit(0)
s.sort()
dic = {}
for c in s:
	if not c in dic:
		dic[c] = 1
	else:
		dic[c] += 1
for d in dic:
	if dic[d] != 1:
		print('Yes')
		exit(0)
print('No')


def ans():
	n = int(input())
	arr = input()
	if n == 1:
		print('Yes')
		return
	ans = {}
	for i in range(n):
		if ans.get(arr[i]) == None:
			ans[arr[i]] = '0'
		else:
			print('Yes')
			return 0
	print('No')
ans()


b = int(input())
a = input()
n = 0
if b == len(a):
	while n < len(a):
		if a.count(a[n]) > 1 or b == 1:
			x = 0
			break
		else:
			x = 1
		n = n + 1
if x == 1:
	print('No')
else:
	print('Yes')


n = int(input())
a = list(input())
d = {}
m = -1
for i in a:
	d[i] = d.get(i, 0) + 1
	if m < d[i]:
		m = d[i]
if len(a) == 1:
	print('Yes')
elif m >= 2:
	print('Yes')
else:
	print('No')


n = int(input())
text = input()
print('YES' if len(set(text)) != len(text) or n == 1 else 'NO')


import sys
freq = [0] * 27
n = int(input())
p = input()
if n == 1:
	print('Yes')
else:
	flag = False
	for i in range(n):
		id = ord(p[i]) - ord('a')
		freq[id] += 1
		if freq[id] > 1:
			flag = True
			break
	if flag == True:
		print('Yes')
	else:
		print('No')


n = int(input())
s = str(input())
if n == 1:
	print('YES')
else:
	m = [str(i) for i in s]
	if len(set(m)) == n:
		print('NO')
	else:
		print('YES')


n = int(input())
s = list(str(input()))
if n == 1 or n > 26:
	print('Yes')
else:
	isnt = True
	for i in s:
		if s.count(i) > 1:
			isnt = False
			break
	if isnt:
		print('No')
	else:
		print('Yes')


n = input()
s = input()
d = dict()
for a in s:
	if a not in d:
		d[a] = 1
	else:
		d[a] = d[a] + 1
for e in d:
	if d[e] > 1:
		print('Yes')
		exit(0)
if len(d) == 1:
	print('Yes')
	exit(0)
print('No')


from operator import itemgetter
n = int(input())
s = input()
alth = 'qwertyuiopasdfghjklzxcvbnm'
ai = [0] * 26
ans = 'Yes'
num = 0
num2 = 0
for i in s:
	ai[alth.find(i)] += 1
for i in range(26):
	if ai[i] > 1:
		num += 1
	if ai[i] == 1:
		num2 += 1
if num2 != 0:
	if num == 0 and n != 1:
		ans = 'No'
print(ans)


n = int(input())
s = list(input())
if n == 1:
	print('Yes')
	exit(0)
for i in range(n):
	if s.count(s[i]) > 1:
		print('Yes')
		exit(0)
print('No')


from collections import Counter
n = int(input())
a = input()
s = Counter(list(a))
b = 0
for i in s.values():
	if i >= 2 or len(a) == 1:
		b += 1
if b >= 1:
	print('YES')
else:
	print('NO')


num = input()
color_hash = [0] * 26
arr = [ord(i) - ord('a') for i in input()]
for color in arr:
	color_hash[color] += 1
num_of_non_one = 0
for val in color_hash:
	if val > 1:
		num_of_non_one += 1
		break
if num == '1' or num_of_non_one > 0:
	print('Yes')
else:
	print('No')


n = int(input())
a = str(input())
a = list(a)
b = []
for i in range(len(a)):
	a[i] = ord(a[i])
for i in range(97, 123):
	b.append(a.count(i))
c = b.count(1)
d = b.count(0)
z = 26 - c - d
if z >= 1 or n == 1:
	print('Yes')
else:
	print('No')


n = int(input())
colors = input()
color_set = set(colors)
l1 = len(colors)
l2 = len(color_set)
if not l1 == l2 or l1 == 1:
	print('Yes')
else:
	print('No')


a = lambda : input()
f = int(a())
z = []
for i in a():
	if z.count(i) > 0:
		print('YES')
		exit()
	z += [i]
print('NO' if f != 1 else 'YES')


n = int(input())
colors = input()
if n == 1:
	print('YES')
else:
	for i in colors:
		if colors.count(i) > 1:
			print('YES')
			exit()
	print('NO')


n = int(input())
a = [i for i in input()]
b = [i for i in set(a)]
if len(a) != len(b) or n == 1:
	print('Yes')
else:
	print('No')


n = int(input())
a = list(input())
lets = set()
if n == 1:
	print('Yes')
	exit(0)
for c in a:
	if lets.__contains__(c):
		print('Yes')
		exit(0)
	lets.add(c)
print('No')


a = input()
s = input()
print('YES' if len(s) == 1 or len(set(s)) != len(s) else 'NO')


from collections import defaultdict
MyDict = defaultdict(int)
input()
X = list(input())
if len(X) == 1:
	print('YES')
	exit()
for i in range(len(X)):
	MyDict[X[i]] += 1
for i in MyDict.values():
	if i >= 2:
		print('YES')
		exit()
print('NO')


from collections import Counter
input()
d = list(input())
s = set(d)
c = Counter(d)
a = 0
for k in s:
	if c[k] > 1:
		a = 1
		break
if len(s) == 1 or a == 1:
	print('Yes')
elif a == 0:
	print('No')


def notpossible(string, n):
	arr = [0 for x in range(26)]
	a = ord('a')
	if n <= 1:
		return False
	if n > 26:
		return False
	else:
		for character in string:
			ind = ord(character) - a
			arr[ind] += 1
			if arr[ind] > 1:
				return False
		return True
n = int(input())
dog_string = input().strip()
if notpossible(dog_string, n):
	print('No')
else:
	print('Yes')


n = int(input())
s = input()
if n == 1:
	print('Yes')
else:
	while True:
		if s != '':
			temp = s[0]
			s = s[1:]
			if temp in s:
				print('Yes')
				break
		else:
			print('No')
			break


n = int(input().strip())
if n > 26 or n == 1:
	print('YES')
	exit()
c = [0 for i in range(26)]
a = list(input().strip())
for i in range(n):
	c[ord(a[i]) - 97] += 1
for k in c:
	if k > 1:
		print('YES')
		break
else:
	print('NO')


n = int(input())
s = str(input())
l = [0] * 26
maxi = 0
for i in range(n):
	l[ord(s[i]) - 97] += 1
	if maxi < l[ord(s[i]) - 97]:
		maxi = l[ord(s[i]) - 97]
if n == 1:
	print('Yes')
elif maxi == 1:
	print('No')
else:
	print('Yes')


n = int(input())
s = set([i for i in input()])
print('Yes' if len(s) < n or n == 1 else 'No')


input()
s = input()
if len(s) == 1:
	print('Yes')
elif len(set(s)) < len(s):
	print('Yes')
else:
	print('No')


I = lambda : map(int, input().split())
n = int(input())
s = input()
if len(set(s)) == len(s) and len(s) != 1:
	print('NO')
else:
	print('YES')


n = int(input())
l = list(input())
if n == 1:
	print('Yes')
else:
	for i in range(97, 123):
		if l.count(chr(i)) >= 2:
			print('Yes')
			exit()
	print('No')


I = input
P = print
I()
m = {}
s = I()
for c in s:
	m[c] = m.get(c, 0) + 1
if len(m) == 1:
	P('YES')
	exit()
for c in m:
	if m[c] > 1:
		P('YES')
		exit()
P('NO')


from collections import defaultdict
n = int(input())
puppies = [i for i in input()]
d = defaultdict(list)
for (count, name) in enumerate(puppies):
	d[name].append(count)
if len(d) == 1:
	print('Yes')
else:
	for key in d:
		if len(d[key]) > 1:
			print('Yes')
			break
	else:
		print('No')


n = int(input())
s = input()
d = {}
for i in s:
	if i in d:
		d[i] += 1
	else:
		d[i] = 1
d = dict(sorted(d.items(), key=lambda x: x[1], reverse=True))
for i in d:
	if d[i] > 1 or len(set(s)) == 1:
		print('Yes')
		break
	else:
		print('No')
		break