The postal code in Atcoder Kingdom is A+B+1 characters long, its (A+1)-th character is a hyphen -, and the other characters are digits from 0 through 9.
You are given a string S. Determine whether it follows the postal code format in Atcoder Kingdom.

-----Constraints-----
 - 1≤A,B≤5
 - |S|=A+B+1
 - S consists of - and digits from 0 through 9.

-----Input-----
Input is given from Standard Input in the following format:
A B
S

-----Output-----
Print Yes if S follows the postal code format in AtCoder Kingdom; print No otherwise.

-----Sample Input-----
3 4
269-6650

-----Sample Output-----
Yes

The (A+1)-th character of S is -, and the other characters are digits from 0 through 9, so it follows the format.

Difficulty: EASY

Solutions:
(A, B) = map(int, input().split())
S = input()
print('Yes' if S[:A].isdigit() and S[A] == '-' and S[A + 1:].isdigit() else 'No')


import re
(A, B) = list(map(int, input().split()))
S = input()
ans = 'No'
p = '\\d{' + str(A) + '}-\\d{' + str(B) + '}'
if re.match(p, S):
	ans = 'Yes'
print(ans)


(a, b) = map(int, input().split())
s = input()
t = s.split('-')
print('Yes' if s[a] == '-' and len(t) == 2 else 'No')


import re
(A, B) = map(int, input().split())
print(['Yes', 'No'][re.match('\\d{{{}}}-\\d{{{}}}\\Z'.format(A, B), input()) is None])


import re
(a, b) = map(int, input().split())
print('Yes' if re.match('\\d{{{}}}-\\d{{{}}}'.format(a, b), input()) else 'No')


(a, b) = map(int, input().split())
s = list(input())
ans = 'No'
if s.count('-') == 1:
	ind = s.index('-')
	alen = ind
	blen = len(s) - (ind + 1)
	if alen == a and blen == b:
		ans = 'Yes'
print(ans)


(A, B) = map(int, input().split())
S = input()
if S[A] == '-' and S.count('-') < 2:
	print('Yes')
else:
	print('No')


(A, B) = map(int, input().split())
S = input()
D = [str(i) for i in range(10)]
T = S[:A] + S[A + 1:]
if S[A] == '-' and all((t in D for t in T)):
	print('Yes')
else:
	print('No')


(A, B) = map(int, input().split())
D = list(input())
if D[A] == '-' and D.count('-') == 1:
	print('Yes')
else:
	print('No')


(a, b) = map(int, input().split())
s = input()
print('Yes' if s.count('-') == 1 and s[a] == '-' else 'No')


(a, b) = map(int, input().split())
s = input()
print('Yes' if s[a] == '-' and str.isdigit(s[:a]) and str.isdigit(s[b + 1:]) else 'No')


import sys
import copy
import math
import itertools
import numpy as np
l = [int(c) for c in input().split()]
A = l[0]
B = l[1]
S = input()
if S[A] == '-' and str.isdecimal(S[0:A] + S[A + 1:A + B]):
	print('Yes')
else:
	print('No')


import re

def answer(a: int, b: int, s: str) -> str:
	pattern = f'\\d{{{a}}}-\\d{{{b}}}'
	if re.match(pattern, s):
		return 'Yes'
	return 'No'

def main():
	(a, b) = list(map(int, input().split()))
	s = input()
	print(answer(a, b, s))

def __starting_point():
	main()
__starting_point()


import re
(a, b) = map(int, input().split())
s = input()
s = re.sub('[0-9]', '+', s)
if s[0:a].count('+') == a and s[a] == '-' and (s[a + 1:a + b + 1].count('+') == b):
	print('Yes')
else:
	print('No')


(a, b) = map(int, input().split())
s = input()
res = s.split('-')
if len(res) == 2:
	if len(res[0]) == a and len(res[1]) == b and res[0].isdigit() and res[1].isdigit():
		print('Yes')
	else:
		print('No')
else:
	print('No')


(A, B) = map(int, input().split())
s = input()
print('Yes' if s.count('-') == 1 and s.index('-') == A else 'No')


(a, _, s) = open(0).read().split()
print('YNeos'[s.count('-') > 1 or '-' != s[int(a)]::2])


(a, b) = map(int, input().split())
s = input()
print('Yes' if s[a] == '-' and s.replace('-', '0', 1).isdecimal() else 'No')


import re
(a, b) = map(str, input().split())
s = input()
print('Yes' if re.match('\\d{' + a + '}-\\d{' + b + '}', s) else 'No')


(A, B) = map(int, input().split())
S = input()
result = 'Yes'
if '-' in S[:A]:
	result = 'No'
if '-' not in S[A]:
	result = 'No'
if '-' in S[A + 1:]:
	result = 'No'
print(result)


(a, b) = map(int, input().split())
s = input().split('-')
print('YNeos'[len(s) != 2 or len(s[0]) != a::2])


import re
(n, m) = input().split()
print('YNeos'[re.match('[0-9]{' + n + '}-[0-9]{' + m + '}', input()) is None::2])


import re
(n, m) = input().split()
print('YNeos'[not re.match('[0-9]{' + n + '}-[0-9]{' + m + '}', input())::2])


(A, B) = map(int, input().split())
S = list(str(input()))
if S.count('-') == 1 and S[A] == '-':
	print('Yes')
else:
	print('No')


(a, b) = map(int, input().split())
s = input()
print('YNeos'[s.count('-') != 1 or s[a] != '-'::2])


import re
n = input()
print('YNeos'[not re.match('[0-9]{' + n[0] + '}-[0-9]{' + n[-1] + '}', input())::2])


(a, b) = map(int, input().split())
s = input()
print('Yes' if s[a] == '-' and (not '-' in s[:a] + s[-b:]) else 'No')


(A, B) = map(int, input().split())
S = list(input())
ans = 'No'
if S[A] == '-' and S.count('-') == 1:
	ans = 'Yes'
print(ans)


(A, B) = map(int, input().split())
S = input()
import re
print('Yes' if re.match('^[0-9]{%d}-[0-9]{%d}$' % (A, B), S) else 'No')


import re
(A, B) = input().split()
S = input()
my_regex = '\\d{' + A + '}-\\d{' + B + '}'
if re.fullmatch(my_regex, S) == None:
	print('No')
else:
	print('Yes')


import re
(a, b) = map(int, input().split())
s = input().split('-')
print('Yes' if len(s) == 2 and len(s[0]) == a else 'No')


(a, b) = list(map(int, input().split()))
s = input()
if len(s) != a + b + 1:
	print('No')
	return
elif s[a] != '-':
	print('No')
	return
elif s.count('-') != 1:
	print('No')
	return
print('Yes')


(A, B) = map(int, input().split(' '))
S = str(input())
ans = 'Yes'
if S[A] != '-':
	ans = 'No'
else:
	S = S.replace('-', '', 1)
	if S.isdecimal() == False:
		ans = 'No'
print(ans)


(n, m) = map(int, input().split())
s = input()
print('Yes' if s[n] == '-' and s[:n].isdecimal() and s[n + 1:].isdecimal() else 'No')


(a, b) = map(int, input().split())
s = input()
print('NYoe s'[s[0:a].isdecimal() and s[a] == '-' and s[a + 1:].isdecimal()::2])


(a, b) = map(int, input().split())
s = input()
res = 'No'
if s[a] == '-':
	if s[:a].isdecimal() and s[a + 1:].isdecimal():
		res = 'Yes'
print(res)


import re
(a, b) = input().split()
r = re.match('\\d{' + a + '}-\\d{' + b + '}$', input())
print('Yes' if r else 'No')


(A, B) = map(int, input().split())
S = input()
print('Yes' if len(S) == A + B + 1 and S.count('-') == 1 and (S[A] == '-') else 'No')


import re
(a, b) = [int(i) for i in input().split()]
print('Yes' if re.match('^\\d{%d}-\\d{%d}$' % (a, b), input()) else 'No')


(A, B) = list(map(int, input().split()))
S = input()
cnt = 0
for i in S:
	if i == '-':
		cnt += 1
if cnt == 1:
	post = S.split('-')
	if len(post[0]) == A and len(post[1]) == B:
		print('Yes')
		return
print('No')


(a, b) = map(int, input().split())
s = list(input())
if len(s) == a + b + 1:
	if s[a] == '-':
		del s[a]
		try:
			if all([0 <= int(x) <= 9 for x in s]):
				print('Yes')
			else:
				print('No')
		except:
			print('No')
	else:
		print('No')
else:
	print('No')


import re
(a, b) = list(map(int, input().split()))
s = input()
if re.search('[0-9][0-9]*', s[0:a]):
	if s[a] == '-':
		if re.search('[0-9][0-9]*', s[a + 1:]):
			print('Yes')
			return
print('No')


import re
(A, B) = map(int, input().split())
S = input()
pattern = re.compile('[0-9]' * A + '-' + '[0-9]' * B)
print('Yes' if pattern.fullmatch(S) != None else 'No')


(A, B) = map(int, input().split())
S = input()
if (S[:A] + S[-B:]).isdecimal() and S[A] == '-':
	print('Yes')
else:
	print('No')


(A, B) = map(int, input().split())
S = input()
if not '-' in S[:A] + S[A + 1:] and S[A] == '-':
	print('Yes')
else:
	print('No')


def main():
	(A, B) = list(map(int, input().split()))
	S = input()
	cond = [len(S) == A + B + 1, S[A] == '-', S[:A].isdigit(), S[A + 1:].isdigit()]
	print('Yes' if all(cond) else 'No')

def __starting_point():
	main()
__starting_point()


import re
(A, B) = map(int, input().split())
print('Yes' if re.match('^\\d{%d}-\\d{%d}$' % (A, B), input()) else 'No')


(a, b) = map(int, input().split())
s = input()
x = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
if s[a] != '-':
	print('No')
	return
s = list(s)
del s[a]
for i in s:
	if i not in x:
		print('No')
		return
print('Yes')


import re
(a, b) = map(int, input().split())
print(re.fullmatch('[0-9]{%d}-[0-9]{%d}' % (a, b), input()) and 'Yes' or 'No')


print('YNeos'[tuple(map(int, input().split())) != tuple(map(len, input().split('-')))::2])


(A, B) = [int(x) for x in input().split()]
S = input()
if (S[:A] + S[-B:]).isdecimal() and S[A] == '-':
	print('Yes')
else:
	print('No')


(A, B) = map(int, input().split())
S = input()
flag = False
if S[A] == '-':
	S_ = S.split('-')
	if len(S_) == 2:
		if len(S_[0]) == A and len(S_[1]) == B:
			if S_[0].isdigit() and S_[1].isdigit():
				flag = True
if flag:
	print('Yes')
else:
	print('No')


(l, m) = map(int, input().split())
p = input().split('-')
print('NYoe s'[len(p) == 2 and len(p[0]) == l and (len(p[1]) == m)::2])


a = list(map(int, input().split()))
S = input()
if S.count('-') == 1 and S[a[0]] == '-':
	print('Yes')
else:
	print('No')


(a, b) = map(int, input().split())
s = input()
print(['No', 'Yes'][s[a] == '-' and s.count('-') < 2])


(a, b) = map(int, input().split())
s = input()
print('Yes' if all([s[:a].isdigit(), s[a] == '-', s[a + 1:].isdigit()]) else 'No')


(a, b) = list(map(int, input().split()))
s = input()
if s[:a].isdecimal() and s[a] == '-' and s[a + 1:].isdecimal():
	print('Yes')
else:
	print('No')


(a, b) = list(map(int, input().split()))
s = input()
if len(s) == a + b + 1:
	if s[a] == '-':
		cnt = 0
		for i in range(len(s)):
			if s[i] == '0' or s[i] == '1' or s[i] == '2' or (s[i] == '3') or (s[i] == '4') or (s[i] == '5') or (s[i] == '6') or (s[i] == '7') or (s[i] == '8') or (s[i] == '9'):
				cnt += 1
		if cnt == a + b:
			print('Yes')
		else:
			print('No')
	else:
		print('No')
else:
	print('No')


(a, b) = map(int, input().split())
s = input()
t = s[:a] + s[-b:]
flg = s[a] == '-' and t.isdecimal()
print(['No', 'Yes'][flg])


(n, m) = map(int, input().split())
s = input()
print('No' if s[n] != '-' or '-' in s[:n] + s[-m:] else 'Yes')


(a, b) = map(int, input().split())
n = input()
if n[0:a].isdecimal() and n[a] == '-' and n[a + 1:a + b + 1].isdecimal():
	print('Yes')
else:
	print('No')


(a, b) = map(int, input().split())
s = input()
t = s[:a] + s[a + 1:]
bl = s[a] == '-' and t.find('-') == -1
print('Yes' if bl else 'No')


(a, b) = list(map(int, input().split()))
s = input()
if len(s) != a + b + 1:
	print('No')
	return
elif s[a] != '-':
	print('No')
	return
else:
	for i in range(0, a):
		if s[i] == '-':
			print('No')
			return
	for i in range(a + 1, a + b + 1):
		if s[i] == '-':
			print('No')
			return
print('Yes')


(a, b) = map(int, input().split())
n = input()
if 1 <= a <= 5 and 1 <= b <= 5:
	if n[a] == '-':
		if n[0:a].isdecimal() and n[a + 1:a + b + 1].isdecimal():
			print('Yes')
			return
print('No')


(A, B) = map(int, input().split())
S = input()
print('NYoe s'[S[A] == '-' and S.count('-') == 1::2])


(a, b) = map(int, input().split())
s = input()
A = s[:a]
con = s[a]
B = s[-b:]
flg = True
num = [str(x) for x in range(10)]
num = set(num)
for x in A:
	if x not in num:
		flg = False
for x in B:
	if x not in num:
		flg = False
if con != '-':
	flg = False
print('Yes' if flg else 'No')


(a, b, s) = open(0).read().split()
a = int(a)
try:
	int(s[:a]) + int(s[a + 1:])
	print('YNeos'[s[a] != '-'::2])
except:
	print('No')


((A, B), S) = (map(int, input().split()), input())
print('No' if '-' in S[:A] + S[A + 1:] or S[A] != '-' else 'Yes')


(a, b) = map(int, input().split())
s = input()
try:
	int(s[:a]) + int(s[a + 1:])
	print(['No', 'Yes'][s[a] == '-'])
except:
	print('No')


import re
(a, b) = input().split()
s = input()
m = re.fullmatch('\\d{' + a + '}-\\d{' + b + '}', s)
print('No' if m is None else 'Yes')


(a, b) = (int(i) for i in input().split())
s = input()
if '-' not in s[:a] and s[a] == '-' and ('-' not in s[a + 1:]):
	print('Yes')
else:
	print('No')


(A, B) = map(int, input().split())
S = list(input().split('-'))
check = False
if len(S) == 2:
	(s, t) = (S[0], S[1])
	if A == len(s) and B == len(t):
		check = True
print('Yes' if check else 'No')


import re
(A, B) = map(int, input().split())
S = input()
former = S[0:A]
later = S[A + 1:A + B + 3]
r_f = re.compile('\\d{' + str(A) + '}')
r_l = re.compile('\\d{' + str(B) + '}')
if r_f.findall(former) and r_l.findall(later) and (S[A] == '-'):
	print('Yes')
else:
	print('No')


import re
(a, b) = list(map(int, input().split()))
s = input()
if s[a] == '-':
	if '-' not in s[:a] + s[a + 1:]:
		print('Yes')
		return
print('No')


(x, y) = map(int, input().split())
S = input()
if len(S) == x + y + 1 and S[x] == '-' and (S.count('-') == 1):
	print('Yes')
else:
	print('No')


import re
z = re.split('\\s', input())
s = input()
print('Yes') if re.match('\\d{' + z[0] + '}-\\d{' + z[1] + '}', s) else print('No')


(a, b) = map(int, input().split())
N = input()
print('Yes' if N[a] == '-' and N.count('-') == True else 'No')


(a, b) = map(int, input().split())
s = list(input())
flag = 'No'
if s[a] == '-' and s.count('-') == 1:
	flag = 'Yes'
print(flag)


(a, b) = map(int, input().split())
s = input()
print(['No', 'Yes'][s[0:a].isdigit() and s[a] == '-' and s[a + 1:].isdigit()])


(a, b) = map(int, input().split())
s = input()
s1 = s[:a] + s[a + 1:]
print('YNeos'['-' in s1 or '-' != s[a]::2])


import math
is_no = 0
(num1, num2) = list(map(int, input().split()))
str1 = input()
table = list(str1)
count = 0
for i in range(len(str1)):
	if table[i] == '-':
		count += 1
	else:
		continue
if count == 1 and table[num1] == '-':
	print('Yes')
else:
	print('No')


(a, b) = map(int, input().split())
s = input()
if '-' in s[:a] or '-' in s[-b:] or s[a] != '-':
	print('No')
else:
	print('Yes')


(a, b) = map(int, input().split())
s = input()
if len(s) == a + b + 1 and s[a] == '-':
	s = s.replace('-', '')
	if s.isdecimal() and len(s) == a + b:
		print('Yes')
		return
print('No')


(a, b) = map(int, input().split())
s = input()
if s.count('-') == 1:
	if s[a] == '-':
		print('Yes')
		exit()
print('No')


(a, b) = map(int, input().split())
s = input()
if s[a] == '-' and str.isdecimal(s[:a] + s[-b:]):
	print('Yes')
else:
	print('No')


(a, _) = map(int, input().split())
s = input()
print('YNeos'[1 - all([s[:a].isdigit(), s[a] == '-', s[a + 1:].isdigit()])::2])


(A, _) = input().split()
S = input()
flag = S.count('-') == 1 and S.find('-') == int(A)
print('Yes' if flag else 'No')


lst = input().split()
A = int(lst[0])
B = int(lst[1])
s = input()
if len(s) == A + B + 1 and s.count('-') == 1 and (s[A] == '-'):
	print('Yes')
else:
	print('No')


(a, b, s) = open(0).read().split()
if (int(a), int(b)) == tuple(map(len, s.split('-'))):
	print('Yes')
else:
	print('No')


(A, B) = map(int, input().split())
S = input()
print('Yes') if (S.find('-') == A) & (S.count('-') == 1) else print('No')


(a, b, s) = open(0).read().split()
a = int(a)
print('NYoe s'['-' not in s[:a] + s[a + 1:] and s[a] == '-'::2])


(a, b) = input().split()
a = int(a)
S = input()
print(['No', 'Yes'][S[a] == '-' and S.count('-') == 1])