Dothraki are planning an attack to usurp King Robert's throne. King Robert learns of this conspiracy from Raven and plans to lock the single door through which the enemy can enter his kingdom.

But, to lock the door he needs a key that is an anagram of a palindrome.  He starts to go through his box of strings, checking to see if they can be rearranged into a palindrome.  Given a string, determine if it can be rearranged into a palindrome.  Return the string YES or NO.  

Example 

$s=\text{'aabbccdd'}$  

One way this can be arranged into a palindrome is $abcddcba$.  Return YES.

Function Description 

Complete the gameOfThrones function below. 

gameOfThrones has the following parameter(s):  

string s: a string to analyze   

Returns  

string:  either YES or NO   

Input Format

A single line which contains $\boldsymbol{\mathrm{~S~}}$.

Constraints

$1\leq$ |s| $\leq10^5$  
$\boldsymbol{\mathrm{~S~}}$ contains only lowercase letters in the range $a s c i i[a\ldots z]$

Sample Input 0
aaabbbb

Sample Output 0
YES

Explanation 0

A palindromic permutation of the given string is bbaaabb.   

Sample Input 1
cdefghmnopqrstuvw

Sample Output 1
NO

Explanation 1

Palindromes longer than 1 character are made up of pairs of characters.  There are none here.  

Sample Input 2
cdcdcdcdeeeef

Sample Output 2
YES

Explanation 2

An example palindrome from the string:  ddcceefeeccdd.

Source: hackerrank | Difficulty: EASY
Tags: String algorithms


Solutions:
string = input()
character_count = {}
for i in string:
	if i not in character_count:
		character_count[i] = string.count(i)
odd_counts = 0
for i in character_count:
	if character_count[i] % 2 == 1:
		odd_counts += 1
if odd_counts > 1:
	print('NO')
else:
	print('YES')


def func():
	txt = input()
	chars = {}
	for c in txt:
		if c in chars:
			chars[c] += 1
		else:
			chars[c] = 1
	x = False
	for e in chars:
		if chars[e] % 2 != 0:
			if x == False:
				x = True
			else:
				print('NO')
				return
	print('YES')
func()


s2 = [0 for i in range(270)]
s = str(input())
for l in s:
	s2[ord(l)] += 1
c = 0
for i in range(270):
	if s2[i] % 2 == 1:
		c += 1
if c > 1:
	print('NO')
else:
	print('YES')


from collections import defaultdict

def gameofthrones(letters):
	frequencies = defaultdict(int)
	for letter in letters:
		frequencies[letter] += 1
	odd = 0
	for (_, value) in frequencies.items():
		if value % 2 != 0:
			if not odd:
				odd = 1
			else:
				return 'NO'
	return 'YES'
print(gameofthrones(input()))


import collections, sys
s = sys.stdin.readline().strip()
c = collections.Counter(s)
parity = (v % 2 for v in c.values())
parity_count = collections.Counter(parity)
if 1 in parity_count:
	if parity_count[1] > 1:
		print('NO')
	else:
		print('YES')
else:
	print('YES')


def isKey(A):
	tmp = []
	for i in A:
		if i in tmp:
			del tmp[tmp.index(i)]
		else:
			tmp.append(i)
	return 'NO' if len(tmp) > 1 else 'YES'
print(isKey(input().strip()))


chars = list(input())
oddSets = 0
for letter in range(ord('a'), ord('z') + 1):
	if chars.count(chr(letter)) % 2 != 0:
		oddSets += 1
if oddSets <= 1:
	print('YES')
else:
	print('NO')


inputString = input()
letters = []
for i in range(0, 256):
	letters.append(0)
for c in inputString:
	letters[ord(c)] += 1
nbOdd = 0
for c in letters:
	if c % 2 == 1:
		nbOdd += 1
if nbOdd > 1:
	print('NO')
else:
	print('YES')


word = input()
counts = {}
for x in word:
	if x not in counts:
		counts[x] = 0
	counts[x] += 1
parity = [0, 0]
for x in counts.keys():
	parity[counts[x] & 1] += 1
print('YES' if parity[1] < 2 else 'NO')


cList = list(input())
ucList = set(cList)
oddCount = 0
result = 'YES'
for letter in ucList:
	if cList.count(letter) % 2 != 0:
		oddCount += 1
if oddCount > 1:
	result = 'NO'
print(result)


import re, sys
text = re.sub('[^a-z]', '', sys.stdin.read().lower())
counts = dict()
numOdds = 0
for i in text:
	if i in counts:
		counts[i] += 1
	else:
		counts[i] = 1
for i in counts.values():
	if i % 2 == 1:
		numOdds += 1
if numOdds == len(text) % 2:
	print('YES')
else:
	print('NO')


from collections import Counter

def main():
	s = input()
	d = Counter(s)
	o = 0
	f = False
	for v in d.values():
		if v % 2 != 0:
			o += 1
			if o > 2:
				f = True
				break
	if f:
		print('NO')
	else:
		print('YES')
main()


import sys

def main():
	text = sys.stdin.readline()
	text = text.strip()
	dictnum = {}
	for ch in text:
		if ch in dictnum:
			dictnum[ch] += 1
		else:
			dictnum[ch] = 1
	numodd = 0
	for value in dictnum.values():
		if value % 2 == 1:
			numodd += 1
	if numodd > 1:
		sys.stdout.write('NO\n')
	else:
		sys.stdout.write('YES\n')
main()


chars = {}
for c in input():
	if c in chars:
		chars[c] += 1
	else:
		chars[c] = 1
odds = 0
for c in chars:
	odds += chars[c] % 2
if odds < 2:
	print('YES')
else:
	print('NO')


string = input()
l = []
m = []
for c in string:
	n = 0
	if c in m:
		continue
	for i in range(0, len(string)):
		if string[i] == c:
			n = n + 1
	m.append(c)
	l.append(n)
k = 0
for j in l:
	if j % 2 == 1:
		k = k + 1
if k > 1:
	print('NO')
else:
	print('YES')


from collections import Counter
YES = 'YES'
NO = 'NO'

def is_anagrammable(line):
	letters = Counter(line)
	odd = False
	for frequency in letters.values():
		if frequency % 2 == 1:
			if odd:
				return False
			odd = True
	return True
line = input()
print(YES if is_anagrammable(line) else NO)


s = input()
ls = {}
for i in range(len(s)):
	key = s[i]
	if key in ls:
		ls[key] += 1
	else:
		ls[key] = 1
if len(s) % 2 == 0:
	for key in ls:
		if ls[key] % 2 != 0:
			print('NO')
			exit()
else:
	oddCount = 0
	for key in ls:
		if ls[key] % 2 != 0:
			oddCount += 1
		if oddCount > 1:
			print('NO')
			exit()
print('YES')


import itertools
key = input()
d = {}
l = len(key)
evf = False
f = False
for ch in key:
	if ch not in d:
		d[ch] = key.count(ch)
if l % 2 == 0:
	for o in d.values():
		if o % 2 != 0:
			print('NO')
			f = True
			break
else:
	for o in d.values():
		if o % 2 != 0:
			if evf == True:
				print('NO')
				f = True
				break
			evf = True
if not f:
	print('YES')


import sys
import array
str = sys.stdin.readline()
count = array.array('i', [0] * 26)
for c in str[:-1]:
	count[ord(c) - ord('a')] += 1
one = 0
for i in count:
	if i % 2 != 0:
		one += 1
if one > 1:
	print('NO')
else:
	print('YES')


import sys

def checkodd(line):
	chars = [0] * 65
	nonod = 0
	for char in line:
		chars[ord(char) - ord('A')] = chars[ord(char) - ord('A')] + 1
	for val in chars:
		if val % 2 == 1:
			nonod = nonod + 1
	if nonod > 2:
		print('NO')
	else:
		print('YES')
for line in sys.stdin:
	checkodd(line)


given_str = input()
solo_mid = None
ANS = 'YES'
for each in set(given_str):
	if given_str.count(each) % 2:
		if not solo_mid:
			solo_mid = each
		else:
			ANS = 'NO'
			break
print(ANS)


from collections import defaultdict
word = input()

def is_key(word):
	letter_count = defaultdict(int)
	for i in word:
		letter_count[i] += 1
	odd_letters = sum((1 for (key, value) in letter_count.items() if value % 2))
	if odd_letters in (0, 1):
		print('YES')
	else:
		print('NO')
	return
is_key(word)


strin = input()
array = dict()
for i in strin:
	if i in array.keys():
		array[i] = array[i] + 1
	else:
		array[i] = 1
check = 0
for i in array:
	if array[i] % 2 != 0:
		check += 1
if check > 1:
	print('NO')
else:
	print('YES')


dict = {}
pw = input()
for char in pw:
	if char != ' ':
		if char in dict:
			dict[char] += 1
		else:
			dict[char] = 1
oddCounter = 0
for num in dict.keys():
	if dict[num] % 2 == 1:
		oddCounter += 1
if oddCounter > 1:
	print('NO')
else:
	print('YES')


import collections
import sys
chars = list(sys.stdin.readline().rstrip('\n'))
cnt = collections.Counter(chars)
nbodd = 0
for c in cnt.values():
	if c % 2 == 1:
		nbodd += 1
if nbodd < 2:
	print('YES')
else:
	print('NO')


def run():
	token = input()
	if len(token) == 1:
		print('YES')
	isValid = validate(getFrequencies(token))
	if isValid == True:
		print('YES')
	else:
		print('NO')

def getFrequencies(token):
	FREQ = {letter: 0 for letter in 'abcdefghijklmnopqrstuvwxyz'}
	for char in range(len(token)):
		FREQ[token[char]] += 1
	return FREQ.values()

def validate(frequencies):
	oddFlag = 0
	for i in frequencies:
		if i % 2 != 0:
			oddFlag += 1
		if oddFlag > 1:
			return False
	return True
run()


from collections import defaultdict
chars = input()
counts = defaultdict(lambda : 0)
for char in chars:
	counts[char] += 1
if len([c for c in counts.values() if c % 2 != 0]) <= 1:
	print('YES')
else:
	print('NO')


import sys

def permutations_recursive(word):
	if len(word) <= 1:
		return [word]
	c = word[0]
	perms = permutations(word[1:])
	result = []
	for perm in perms:
		for i in range(len(perm) + 1):
			result.append(perm[:i] + c + perm[i:])
	return result

def check_palindrome(word):
	if not len(word) % 2:
		checked = set()
		for c in word:
			if c not in checked:
				if word.count(c) % 2:
					return 'NO'
				checked.add(c)
	else:
		checked = set()
		already_odd = False
		for c in word:
			if c not in checked:
				print(c, file=sys.stderr)
				if word.count(c) % 2:
					if already_odd:
						return 'NO'
					already_odd = True
				checked.add(c)
	return 'YES'
print(check_palindrome(input()))


def solve(s):
	d = dict()
	for x in s:
		d[x] = d.get(x, 0) + 1
	count = 0
	l = list(d.values())
	for x in l:
		if x % 2 == 1:
			count += 1
	return count == 0 or count == 1

def main():
	s = input()
	if solve(s):
		print('YES')
	else:
		print('NO')
main()


a = input()
temp = []
for x in a:
	if x in temp:
		temp.pop(temp.index(x))
	else:
		temp.append(x)
if len(temp) < 2:
	print('YES')
else:
	print('NO')


def count_chars(samplestring):
	chars_to_count = set(samplestring)
	odd_char_count = (samplestring.count(item) for item in chars_to_count if samplestring.count(item) % 2 != 0)
	counter = 0
	while counter < 2:
		try:
			next(odd_char_count)
			counter += 1
		except StopIteration:
			break
	if counter > 1:
		return 'NO'
	else:
		return 'YES'
samplestring = input()
print(count_chars(samplestring))


d = {'a': 0, 'b': 0, 'c': 0, 'd': 0, 'e': 0, 'f': 0, 'g': 0, 'h': 0, 'i': 0, 'j': 0, 'k': 0, 'l': 0, 'm': 0, 'n': 0, 'o': 0, 'p': 0, 'q': 0, 'r': 0, 's': 0, 't': 0, 'u': 0, 'v': 0, 'w': 0, 'x': 0, 'y': 0, 'z': 0}
string = input()
for i in string:
	d[i] = d[i] + 1
num_evens = 0
num_odds = 0
flag = 0
for key in d.keys():
	if d.get(key) % 2 != 0:
		num_odds = num_odds + 1
	if num_odds > 1:
		flag = 1
		break
if flag == 1:
	print('NO')
else:
	print('YES')


__author__ = 'jonghewk'
in_str = input()
d = dict()
for i in in_str:
	if i not in d:
		d[i] = 1
	else:
		d[i] += 1
odd = 0
is_ok = True
for i in d:
	if odd is 2:
		is_ok = False
		break
	if d[i] % 2 is 1:
		odd += 1
if is_ok is False:
	print('NO')
else:
	print('YES')


word = input()
table = {}
odds = 0
for i in range(len(word)):
	if word[i] in table:
		table[word[i]] = table[word[i]] + 1
	else:
		table[word[i]] = 1
for key in table:
	if table[key] % 2 != 0:
		odds = odds + 1
		if odds > 1:
			break
if odds > 1:
	print('NO')
else:
	print('YES')


def find_unpaired(char_set):
	return [char for (char, count) in char_set.items() if count % 2 == 1]

def is_word_key(word):
	char_set = {c: word.count(c) for c in set(word)}
	unpaired = find_unpaired(char_set)
	return len(unpaired) <= 1
try:
	word = input()
	print('YES' if is_word_key(word) else 'NO')
except:
	pass


zz = input()
arr = [0] * 26
for i in zz:
	if arr[ord(i) - 97] == 0:
		arr[ord(i) - 97] = 1
	else:
		arr[ord(i) - 97] = 0
l = len(zz)
oddflag = 0
for i in range(0, 25):
	if arr[i] != 0:
		oddflag += 1
if oddflag > 1:
	print('NO')
elif l % 2 != 0 and oddflag == 1:
	print('YES')
elif l % 2 == 0 and oddflag == 0:
	print('YES')
else:
	print('NO')


def check_palyndrome(char):
	count = 0
	for j in char:
		if int(char[j]) % 2 == 1:
			count += 1
	if count > 1:
		return 'NO'
	else:
		return 'YES'
bridge = str(input())
char = {}
for i in range(0, len(bridge)):
	if bridge[i] not in char:
		char[bridge[i]] = 1
	else:
		char[bridge[i]] += 1
print(check_palyndrome(char))


string = input().strip()
char_count = dict()
for char in string:
	if char in char_count:
		char_count[char] += 1
	else:
		char_count[char] = 1
num_odds = 0
for char in char_count:
	if char_count[char] % 2 == 0:
		continue
	else:
		num_odds += 1
if num_odds > 1:
	print('NO')
else:
	print('YES')


w = input()
counts = {}
for i in w:
	if i in counts:
		counts[i] += 1
	else:
		counts[i] = 1
numOdd = 0
for i in counts:
	if counts[i] % 2 == 1:
		if len(w) % 2 == 0 or numOdd >= 1:
			print('NO')
			exit()
		numOdd += 1
print('YES')


s = input()
se = set(s)
se = list(se)
odd = 0
for i in se:
	n = s.count(i)
	if n % 2 != 0:
		odd += 1
	if odd > 1:
		print('NO')
		exit()
print('YES')


import sys
line = sys.stdin.readline().replace('\n', '')
freqs = {}
odd = 0
for char in line:
	freqs[char] = freqs.get(char, 0) + 1
for freq in freqs.values():
	if freq % 2 == 1:
		odd += 1
print('NO' if odd > 1 else 'YES')


import collections, sys
s = sys.stdin.readline().strip()
c = collections.Counter(s)
parity = (v % 2 for v in c.values())
parity_count = collections.Counter(parity)
if 1 in parity_count:
	print('NO' if parity_count[1] > 1 else 'YES')
else:
	print('YES')


def func(st):
	ar = sorted(list(st))
	s = 1
	odd_flag = 0
	while s < len(ar):
		if ar[s - 1] != ar[s]:
			odd_flag += 1
			s += 1
			if odd_flag > 1:
				return 'NO'
		else:
			s += 2
	return 'YES'
print(func(input()))


s = input()
d = dict()
for c in s:
	try:
		d[c] += 1
	except KeyError:
		d[c] = 1
l = len(s)
valid = True
if l % 2 == 0:
	for e in d:
		if d[e] % 2 != 0:
			valid = False
			break
	if not valid:
		print('NO')
	else:
		print('YES')
else:
	f = 0
	for e in d:
		if d[e] % 2 != 0:
			f += 1
		if f > 1:
			valid = False
			break
	if not valid:
		print('NO')
	else:
		print('YES')


from collections import defaultdict
x = input()
count = defaultdict(int)
for letter in x:
	count[letter] += 1
foundOdd = False
for k in count:
	if count[k] % 2 != 0:
		if foundOdd:
			print('NO')
			exit()
		else:
			foundOdd = True
print('YES')


line = input()
alpha = [0 for i in range(26)]
l = len(line)
for i in range(l):
	alpha[ord(line[i]) - 97] += 1
odd = 0
for i in range(26):
	if alpha[i] % 2 == 1:
		odd += 1
if odd > 1:
	print('NO')
else:
	print('YES')


s = input()
notodd = True
while True:
	if s:
		c = s[0]
		n = s.count(c)
		if n % 2:
			if notodd:
				notodd = False
			else:
				print('NO')
				break
		s = s.replace(c, '')
	else:
		print('YES')
		break


text = input()
freq = 26 * [0]
for c in text:
	freq[ord(c) - 97] += 1
evens = odds = 0
for f in freq:
	if f % 2 != 0:
		odds += 1
if odds > 1:
	print('NO')
else:
	print('YES')


word = input()
mapping = {}
for c in word:
	if c in mapping:
		mapping[c] += 1
	else:
		mapping[c] = 1
numOdds = 0
for e in mapping:
	if mapping[e] % 2 == 1:
		numOdds += 1
		if numOdds > 1:
			break
if numOdds > 1:
	print('NO')
else:
	print('YES')


import string
word = input()
letterCount = []
for letter in string.ascii_lowercase:
	if word.count(letter):
		letterCount.append(word.count(letter))
ok = True
if len(word) % 2 == 0:
	for i in letterCount:
		if i % 2 != 0:
			ok = False
			break
else:
	usedOdd = False
	for i in letterCount:
		if i % 2 != 0 and usedOdd:
			ok = False
			break
		elif i % 2 != 0 and usedOdd == False:
			usedOdd = True
if ok:
	print('YES')
else:
	print('NO')


import sys
chars = [0 for i in range(26)]
line = sys.stdin.readline()
for c in range(len(line) - 1):
	i = ord(line[c]) - 97
	chars[i] = chars[i] + 1
found_odd = False
for i in range(26):
	if chars[i] % 2 == 1:
		if found_odd:
			sys.stdout.write('NO')
			exit()
		else:
			found_odd = True
sys.stdout.write('YES')


s = input()
occurence = {}
for z in s:
	occurence[z] = occurence.get(z, 0) + 1
odd = 0
for k in occurence.values():
	if k % 2:
		odd += 1
if odd < 2:
	print('YES')
else:
	print('NO')


import sys

def containsPalindromicAnagram(word):
	wordLength = len(word)
	allowOdd = False
	foundOdd = False
	if wordLength % 2 == 1:
		allowOdd = True
	characters = set(word)
	for char in characters:
		count = word.count(char)
		isOdd = count % 2 == 1
		if isOdd == True:
			if allowOdd == False or foundOdd == True:
				return False
			else:
				foundOdd = True
	return True
word = sys.stdin.readline()
if containsPalindromicAnagram(word.strip()) == True:
	print('YES')
else:
	print('NO')


import sys
s = input()
s = list(s)
n = []
for i in list(''.join(set(s))):
	n.append(s.count(i))
	s = [x for x in s if x != i]
k = []
for i in n:
	k.append(i % 2)
if sum(k) < 2:
	print('YES')
else:
	print('NO')


def palz(pal):
	pal = sorted(list(pal))
	a = pal[0]
	listy = []
	county = 0
	for i in set(pal):
		x = pal.count(i)
		if x % 2 != 0:
			county += 1
	if county > 1:
		print('NO')
	else:
		print('YES')
T = input()
palz(T)


def game_of_thrones(word):
	letters = set(word)
	odd = 0
	odd_len = bool(len(word) & 1)
	for ch in letters:
		if word.count(ch) & 1:
			odd += 1
		if not odd_len and odd:
			return 'NO'
		if odd_len and odd > 1:
			return 'NO'
	return 'YES'
print(game_of_thrones(input()))


line = input().strip()
oddCount = 0
exChars = []
for c in line:
	if c in exChars:
		continue
	if line.count(c) % 2 > 0:
		oddCount += 1
	exChars.append(c)
res = 'NO'
if len(line) % 2 == 0 and oddCount == 0 or (len(line) % 2 > 0 and oddCount == 1):
	res = 'YES'
print(res)


s = input('')
b = []
a = list(s)
a.sort()
k = a[0]
c = 0
for i in range(len(a)):
	if a[i] == k and i != len(a) - 1:
		c += 1
	elif i == len(a) - 1:
		if a[i] == k:
			c += 1
			b.append(c)
		else:
			b.append(c)
			b.append(1)
	else:
		b.append(c)
		c = 1
		k = a[i]
m = 2
for j in b:
	if j % 2 != 0:
		m -= 1
if m >= 1:
	print('YES')
else:
	print('NO')


from collections import Counter
import sys
for line in sys.stdin:
	histogram = Counter(line.strip())
	if sum((freq % 2 for freq in histogram.values())) <= 1:
		print('YES')
	else:
		print('NO')


s = input()
d = set()
for c in s:
	if c in d:
		d.remove(c)
	else:
		d.add(c)
print('YES' if len(d) <= 1 else 'NO')


def main():
	s = input()
	count = [0] * 26
	for ch in s:
		count[ord(ch) - ord('a')] += 1
	sum = 0
	for cnt in count:
		if cnt % 2 != 0:
			sum += 1
	if sum <= 1:
		print('YES')
	else:
		print('NO')
main()


import itertools, math, sys
given = sys.stdin.readline()[:-1]

def ispalindrome(astr):
	myset = set(astr)
	if len(myset) == 1:
		print('YES')
		exit()
	if len(myset) % 2 == 0:
		if len(astr) % 2 == 0:
			for el in myset:
				if astr.count(el) % 2 != 0:
					print('NO')
		if len(astr) % 2 != 0:
			count = 0
			for el in myset:
				if astr.count(el) % 2 != 0:
					count = count + 1
			if count != 1:
				print('NO')
				exit()
	if len(myset) % 2 != 0:
		if len(astr) % 2 == 0:
			for el in myset:
				if astr.count(el) % 2 != 0:
					print('NO')
					exit()
		if len(astr) % 2 != 0:
			count = 0
			for el in myset:
				if astr.count(el) % 2 != 0:
					count = count + 1
			if count != 1:
				print('NO')
				exit()
	print('YES')
	exit()
ispalindrome(given)


import sys
from collections import Counter

def ana_palin(string):
	cnt = Counter(string)
	return len({k: v for (k, v) in cnt.items() if v % 2 == 1}) <= 1

def main():
	string = sys.stdin.readline().strip()
	if ana_palin(string):
		print('YES')
	else:
		print('NO')
main()


s = input()
a = {}
for c in s:
	a[c] = a.get(c, 0) + 1
count = 0
for c in a:
	if a[c] % 2 == 1:
		count += 1
if count < 2:
	print('YES')
else:
	print('NO')


text = input()
from collections import defaultdict as ddict
counts = ddict(lambda : 0)
for char in text:
	counts[char] ^= 1
print('YES' if sum(counts.values()) <= 1 else 'NO')


from collections import Counter
if len(list(filter(lambda n: n % 2 == 1, Counter(input()).values()))) > 1:
	print('NO')
else:
	print('YES')


s = input().strip()
a = [0 for i in range(26)]
l = len(s)
for i in s:
	a[ord(i) - 97] += 1
c = 0
for i in a:
	if i % 2 == 1:
		c += 1
	if c >= 2:
		break
if c >= 2:
	print('NO')
else:
	print('YES')


import sys
indices = {c: i for (i, c) in enumerate('abcdefghijklmnopqrstuvwxyz')}
occurences = [0] * 26
string = sys.stdin.readline().rstrip('\n')
for c in string:
	occurences[indices[c]] += 1
if len(string) % 2 == 0:
	if any([i % 2 for i in occurences]):
		print('NO')
	else:
		print('YES')
elif sum([i % 2 for i in occurences]) > 1:
	print('NO')
else:
	print('YES')


stringthing = input()
charset = [0] * 256
for x in range(0, len(stringthing)):
	a = ord(stringthing[x])
	charset[a] += 1
evens = 0
odds = 0
for y in range(0, 256):
	if charset[y] == 0:
		pass
	elif charset[y] % 2 == 0:
		evens += 1
	else:
		odds += 1
if odds > 1:
	print('NO')
else:
	print('YES')


a = input()
ht = {}
oneImpar = False
no = False
for x in a:
	try:
		ht[x] += 1
	except:
		ht[x] = 1
for key in ht:
	if ht[key] % 2 == 1:
		if oneImpar == False:
			oneImpar = True
		else:
			print('NO')
			no = True
			break
if no == False:
	print('YES')


from string import ascii_lowercase
inp = input()
odd = 0
d = dict.fromkeys(inp, 0)
for i in inp:
	d[i] += 1
for j in d:
	if d[j] % 2 != 0:
		odd += 1
if odd > 1:
	print('NO')
else:
	print('YES')


import sys

def isPalindrome(string):
	strList = list(string)
	length = len(strList)
	charFreqTable = {}
	for i in range(length):
		if strList[i] in charFreqTable.keys():
			charFreqTable[strList[i]] += 1
		else:
			charFreqTable[strList[i]] = 1
	valuesList = list(charFreqTable.values())
	isPalindrome = True
	oddCounter = 0
	for i in range(len(valuesList)):
		if valuesList[i] % 2:
			oddCounter += 1
			if oddCounter >= 2:
				isPalindrome = False
				break
	return isPalindrome
string = input()
isPalin = isPalindrome(string)
if isPalin:
	print('YES')
else:
	print('NO')


import fileinput

def canBePalindrome(word):
	odd_allowed = len(word) % 2
	odd_encountered = 0
	while len(word) > 0:
		char = word[0]
		occurrences = word.count(char)
		if occurrences % 2:
			odd_encountered += 1
			if odd_encountered > odd_allowed:
				return 'NO'
		word = word.replace(char, '')
	return 'YES'
for line in fileinput.input():
	print(canBePalindrome(line.strip()))


import collections
import sys

def F(data):
	characters = list(data)
	groups = collections.Counter(characters)
	if len(characters) % 2 == 0:
		for key in groups.keys():
			if groups[key] % 2 != 0:
				return False
		return True
	else:
		characterPresentEvenTimes = 0
		for key in groups.keys():
			if groups[key] % 2 != 0:
				characterPresentEvenTimes += 1
		if characterPresentEvenTimes != 1:
			return False
		else:
			return True
data = sys.stdin.readlines()[0].replace('\n', '')
if F(data):
	print('YES')
else:
	print('NO')


counts = [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]
s = input().strip()
for c in s:
	counts[ord(c) - ord('a')] += 1
if len(s) % 2 == 0:
	print('YES' if all([c % 2 == 0 for c in counts]) else 'NO')
else:
	singles = 0
	for c in counts:
		if c % 2 == 1:
			singles += 1
	print('YES' if singles == 1 else 'NO')


test_string = input()
char_counters = dict()
for char in test_string:
	if char not in char_counters:
		char_counters[char] = 0
	char_counters[char] += 1
allow_odd_char = len(test_string) % 2 == 1
for char in char_counters:
	if char_counters[char] % 2 != 0:
		if allow_odd_char:
			allow_odd_char = False
		else:
			print('NO')
			exit()
print('YES')


word = input()
letters = {}
for c in word:
	if c not in letters:
		letters[c] = 0
	letters[c] += 1
odd = 0
for c in letters:
	if letters[c] % 2 == 1:
		odd += 1
print('YES' if odd < 2 else 'NO')


s = str(input())
count = {}.fromkeys(set(s), 0)
for x in s:
	count[x] = (1 + count[x]) % 2
print('NO') if sum(count.values()) > 1 else print('YES')


import sys
word = input()
letterDict = dict()
for c in word:
	if c in letterDict:
		letterDict[c] += 1
	else:
		letterDict[c] = 1
alreadySingle = False
for v in letterDict.values():
	if v % 2 == 1:
		if alreadySingle:
			print('NO')
			sys.exit(0)
		else:
			alreadySingle = True
print('YES')


letters = 'abcdefghijklmnopqrstuvwxyz'
line = input()
m = {}
for l in letters:
	m[l] = 0
for ch in line:
	m[ch] += 1
r = 0
for l in letters:
	if m[l] % 2 == 1:
		r += 1
print('YES' if r <= 1 else 'NO')


import itertools
string = input()
string = list(string)
dict = {}
for char in string:
	dict[char] = 0
for char in string:
	dict[char] += 1
if len(string) % 2:
	if len(string) == 1:
		print('YES')
	else:
		f = 0
		for char in dict:
			if dict[char] % 2:
				f += 1
		if f > 1:
			print('NO')
		else:
			print('YES')
else:
	f = 1
	for char in dict:
		if dict[char] % 2:
			f = 0
	if f == 0:
		print('NO')
	else:
		print('YES')


from collections import Counter

def prog():
	num_odd = 0
	characters = Counter(str(input()))
	for char in characters:
		if characters[char] % 2 == 1:
			if num_odd > 1:
				print('NO')
				return
			num_odd += 1
	print('YES')
prog()


import string
counts = {val: 0 for val in string.ascii_lowercase}
s = input()
for e in s:
	counts[e] += 1
odd = False
out = False
for key in counts:
	curr = counts[key]
	if curr % 2 == 1:
		if odd:
			print('NO')
			out = True
			break
		else:
			odd = True
if not out:
	print('YES')


w = input()
if len(w) % 2 == 1:
	c = 0
	s = set(w)
	for i in s:
		if w.count(i) % 2 == 1:
			c += 1
			if c >= 2:
				print('NO')
				break
	if c < 2:
		print('YES')
else:
	s = set(w)
	N = 0
	for i in s:
		if w.count(i) % 2 == 1:
			N = 1
			print('NO')
			break
	if N == 0:
		print('YES')


inp = input()
evens_num = len(inp)
is_char_even = dict([char_tup for char_tup in zip(inp, [True for i in inp])])
for i in inp:
	is_char_even[i] = not is_char_even[i]
	if is_char_even[i]:
		evens_num += 1
	else:
		evens_num -= 1
if evens_num == len(inp) or evens_num == len(inp) - 1:
	print('YES')
else:
	print('NO')


line = input()
dict_letters = dict()
for letter in line:
	dict_letters[letter] = dict_letters.get(letter, 0) + 1
singlet = None
out = 'YES'
for (k, v) in dict_letters.items():
	if v % 2 == 0:
		continue
	if singlet:
		out = 'NO'
	singlet = k
print(out)


word = input()
isOddLen = len(word) % 2 == 1
letters = {}
for c in word:
	if c in letters:
		letters[c] = letters[c] + 1
	else:
		letters[c] = 1
result = 'YES'
for key in letters.keys():
	if letters[key] % 2 == 1:
		if isOddLen:
			isOddLen = False
		else:
			result = 'NO'
			break
print(result)


inp_list = list(input())
if len(inp_list) % 2 == 0:
	inp_Even = True
else:
	inp_Even = False
inp_unique = list('')
for lett in inp_list:
	if lett not in inp_unique:
		inp_unique.append(lett)
cnt_unique = list('')
for i in range(len(inp_unique)):
	cnt_unique.append(inp_list.count(inp_unique[i]))
cnt_Even = 0
cnt_Odd = 0
for i in range(len(cnt_unique)):
	if cnt_unique[i] % 2 == 0:
		cnt_Even += 1
	else:
		cnt_Odd += 1
if inp_Even == True and cnt_Odd == 0:
	print('YES')
elif inp_Even == False and cnt_Odd == 1:
	print('YES')
else:
	print('NO')


def test(string):
	oneven = 0
	minstring = ''
	for char in string:
		if char not in minstring:
			minstring = minstring + char
	for char in minstring:
		if float(string.count(char) / 2) % 1 != 0:
			oneven += 1
	if oneven > 1:
		return 'NO'
	else:
		return 'YES'
string = input()
print(test(string))


counters = {}
odds = 0
inp = input()
for i in inp:
	if i in counters:
		if counters[i] % 2 == 0:
			odds = odds + 1
		else:
			odds = odds - 1
		counters[i] = counters[i] + 1
	else:
		odds = odds + 1
		counters[i] = 1
if odds > 1:
	print('NO')
else:
	print('YES')


def countCurrentLetter(letters, i):
	assert i < len(letters)
	letter = letters[i]
	count = 0
	while i < len(letters):
		if letters[i] == letter:
			count += 1
			i += 1
		else:
			break
	return count

def canBePalindrome(string):
	letters = list(string)
	letters.sort()
	oddCount = 0
	i = 0
	while i < len(letters):
		letterCount = countCurrentLetter(letters, i)
		i += letterCount
		if letterCount % 2 != 0:
			oddCount += 1
			if oddCount > 1:
				return 'NO'
	return 'YES'
string = input().strip()
print(canBePalindrome(string))


d = {}
s = input()
for char in s:
	if char in d:
		d[char] += 1
	else:
		d[char] = 1
if sum([1 for item in d if d[item] % 2 == 1]) < 2:
	print('YES')
else:
	print('NO')


def isPalindromeAnagram(string):
	buffer = set()
	for char in string:
		if char in buffer:
			buffer.remove(char)
		else:
			buffer.add(char)
	return len(buffer) <= 1
testString = input()
if isPalindromeAnagram(testString):
	print('YES')
else:
	print('NO')


string = input()
counter = {}
for c in string:
	counter[c] = counter.get(c, 0) + 1
odds = 0
for c in counter.values():
	if c % 2 == 1:
		odds += 1
if odds <= 1:
	print('YES')
else:
	print('NO')


from collections import defaultdict
x = list(input())
d = {}
d = defaultdict(lambda : 0, d)
j = 0
flag = True
for i in x:
	d[i] += 1
for z in list(d.values()):
	if z % 2 == 0:
		pass
	else:
		flag = False
		j += 1
	if j > 1:
		break
if flag == True or (flag == False and j == 1):
	print('YES')
elif j > 1 and flag == False:
	print('NO')


def can_be_palindrome(string):
	string = sorted(string)
	current_letter_count = 1
	middle = False
	for (index, char) in enumerate(list(string[1:])):
		if string[index] != char:
			if current_letter_count % 2:
				if not middle:
					middle = True
				else:
					return False
		current_letter_count += 1
	return True
print('YES' if can_be_palindrome(input()) else 'NO')


def hasPalindromPermutation(s):
	chars = {}
	for c in s:
		if c in chars:
			chars[c] += 1
		else:
			chars[c] = 1
	numCharsWithOddCount = len([x for x in chars if chars[x] % 2 == 1])
	return len(s) % 2 == numCharsWithOddCount
print('YES' if hasPalindromPermutation(input()) else 'NO')


from collections import Counter
s = input()
c = Counter(s).values()
if sum((e % 2 for e in c)) == len(s) % 2:
	print('YES')
else:
	print('NO')


s = input()
chars = [0 for i in range(ord('z') - ord('a') + 1)]
for ch in s:
	chars[ord(ch) - ord('a')] += 1
odds = 0
for ch in chars:
	if ch % 2 == 1:
		odds += 1
if odds > 1:
	print('NO')
else:
	print('YES')


alphas = [0 for _ in range(26)]
data = input()
for char in data:
	index = ord(char) - ord('a')
	alphas[index] += 1
oddCount = 0
for val in alphas:
	if val % 2 != 0:
		oddCount += 1
if oddCount > 1:
	print('NO')
else:
	print('YES')