Problem:
 Score : 200 points    Problem Statement 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 1 3 4
269-6650      Sample Output 1 Yes  The (A+1) -th character of S is - , and the other characters are digits from 0 through 9 , so it follows the format.       Sample Input 2 1 1
---      Sample Output 2 No  S contains unnecessary - s other than the (A+1) -th character, so it does not follow the format.       Sample Input 3 1 2
7444      Sample Output 3 No

Solution (Python):
a,b=map(int,input().split())
s=input()
x=0
if s[a]=='-':
    for i in range(10):
        x+=s.count(str(i))
    if x==len(s)-1:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Solution (Python):
import sys

A,B = map(int, input().split())
S = input()

str_len = len(S)

for i in range(str_len):

    a = S[i]
    if i==A:
        if a=="-":
            continue
        else:
            print("No")
            sys.exit()
    if str.isdecimal(a)==False:
        print("No")
        sys.exit()
print("Yes")

Solution (Python):
a,b=map(int,input().split())
s=input()
num=[str(i) for i in range(10)]
for i in range(a):
    if not(s[i] in num):
        print("No")
        exit()
if s[a]!="-":
    print("No")
    exit()
for i in range(a+1,a+b+1):
    if not(s[i] in num):
        print("No")
        exit()
print("Yes")

Solution (Python):
a,b=map(int,input().split())
s=input()

if len(s)==a+b+1 and s[a]=="-" and s.count("-")==1:
  print("Yes")
else:
  print("No")

Solution (Python):
A, B = map(int, input().split())
S = input()

if S[A] == "-" and S.count("-") == 1:
  print("Yes")
else:
  print("No")

Solution (Python):
a,b = map(int,input().split())
s = input()

f=True
for i in range(len(s)):
	if i==a:
		if s[i]!='-':
			f=False
			break
	else:
		if s[i] not in '0123456789':
			f=False
			break

if len(s)!=a+b+1:
	f=False

print('Yes' if f else 'No')

Solution (Python):
import sys

a, b = map(int, sys.stdin.readline().split())
s = sys.stdin.readline().rstrip()

def main():
    return 'Yes' if s[a] == '-' and not '-' in set(s[:a] + s[a+1:]) else 'No'

if __name__ == '__main__':
    ans = main()
    print(ans)

Solution (Python):
a, b = map(int, input().split())
s = input()

if s[a] == '-' and not '-' in s[:a] and not '-' in s[a + 1:]:
    print('Yes')
else:
    print('No')

Solution (Python):
a, b = map(int, input().split())
s = input()

if s[:a].isdecimal() and s[a] == '-' and s[a+1:].isdecimal():
    print('Yes')
else:
    print('No')

Solution (Python):
import sys
a, b = map(int, sys.stdin.readline().split())
s = input()

if s[a] == "-" and s[:a].isdecimal() and s[a+1:].isdecimal():
    print("Yes")
else:
    print("No")

Solution (Python):
l=[str(i) for i in range(10)]
n,m=map(int,input().split())
w=input()
for i in range(n):
  if w[i] in l:
    pass
  else:
    print("No")
    exit()
if w[n]!="-":
  print("No")
  exit()
for i in range(m):
  if w[i+1+n] in l:
    pass
  else:
    print("No")
    exit()
print("Yes")

Solution (Python):
num = list(map(int,input().split()))
s = input()
cnt=0
for i in range(len(s)):
	if(s[i] == "-"):
		cnt+=1
if(cnt > 1):
	print("No")
	exit()
if((len(s) == num[0]+num[1]+1) and (s[num[0]] == "-")):
	print("Yes")
else:
	print("No")

Solution (Python):
a,b=map(int,input().split())
s=input()
ls=list("1234567890")
for x in range(a):
  if s[x] not in ls:
    print("No")
    exit()
if s[a] != "-":
  print("No")
  exit()
for x in range(b):
  if s[a+x+1] not in ls:
    print("No")
    exit()
print("Yes")

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

Solution (Python):
A,B = map(int,input().split())
s= input()
Answer = 'No'
if s[:A].isdecimal()==True:
  if s[A+1:A+B+1].isdecimal()==True:
    if s[A]=='-':
      Answer = 'Yes'

print(Answer)

Solution (Python):
A,B = map(int, input().split())

S =  input()


if  S[A] == "-" and S.count("-") == 1:
    ans = "Yes"
else:
    ans = "No"

print(ans)

Solution (Python):
import sys

def solve():
    input = sys.stdin.readline
    mod = 10 ** 9 + 7
    il = [str(i) for i in range(0, 10)]
    a, b = list(map(int, input().rstrip('\n').split()))
    s = str(input().rstrip('\n'))
    for i, v in enumerate(s):
        if i < a or a < i < a + b + 1:
            if v not in il:
                print("No")
                exit()
        elif i == a:
            if v != "-":
                print("No")
                exit()
    print("Yes")


if __name__ == '__main__':
    solve()

Solution (Python):
a,b=map(int,input().split())
w=input()
flag=0
if w.count('-')!=1:
    flag=1
if w.count('-')!=0:
    if w.index('-')!=a:
        flag=1
if flag:print('No')
else:print('Yes')

Solution (Python):
a,b=map(int,input().split())
s=input()
if 1<=a<=5 and 1<=b<=5:
    if s[a]=="-":
        if s[0:a].isdecimal() and s[a+1:a+b+1].isdecimal():
            print("Yes")
            exit()
print("No")

Solution (Python):
a,b = map(int,input().split())
s = input()

if s[:a].isdecimal()==True and s[-b:].isdecimal()==True and s[a]=='-' and len(s[a+1:])==b:
    print("Yes")
else:
    print("No")

Solution (Python):
A, B = map(int, input().split())
S = input()
pos_hyphen = [i for i in range(len(S)) if S[i] == "-"]
if len(pos_hyphen) == 1 and pos_hyphen[0] == A:
    print("Yes")
else:
    print("No")

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

Solution (Python):
a,b = map(int,input().split())
s = input().split('-')

if len(s) != 2:
    print('No')
    exit()
else:
    if a == len(s[0]):
        if b == len(s[1]):
            print('Yes')
            exit()
        else:
            print('No')
            exit()
    else:
        print('No')
        exit()

Solution (Python):
a, b = map(int, input().split())
s = input()
if len(s) == a + b + 1 and s[a] == '-':
    for i in range(len(s)):
        if i != a and not ('0' <= s[i] and s[i] <= '9'):
            print('No')
            exit()
    print('Yes')
else:
    print('No')

Solution (Python):
a,b=map(int,input().split())
x=input()

num1=x[0:a]
hi=x[a]
num2=x[a+1:]
if num1.isdecimal()==True and num2.isdecimal()==True and hi=="-":
  print("Yes")
else:
  print("No")

Solution (Python):
import re
a, b = map(int, input().split())
s = input()

s_a = s[0:a]
s_b = s[a+1:]


if s[a] == '-' and re.fullmatch(r'[0-9]+', s_a) != None and re.fullmatch(r'[0-9]+', s_b):
    print('Yes')
else:
    print('No')

Solution (Python):
a,b=map(int,input().split())
s=input()
x=[str(i) for i in range(10)]
y="-"
for i in range(a+b+1):
    if i==a:
        if s[i]!="-":
            print("No")
            break
    else:
        if s[i] not in x:
            print("No")
            break
else:
    print("Yes")

Solution (Python):

import sys, math, itertools, heapq, collections, bisect, string
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
sys.setrecursionlimit(10**7)
inf = float('inf')
mod = 10**9+7
ans = inf ;count = 0 ;pro = 1

a,b=map(int,input().split())
s=input()
for i in range(a):
    if s[i]=="-":
        print("No")
        exit()
if s[a]!="-":
    print("No")
    exit()
for i in range(a+1,a+b+1):
    if s[i] == "-":
        print("No")
        exit()
print("Yes")

Solution (Python):

import sys, math, itertools, heapq, collections, bisect, string
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
sys.setrecursionlimit(10**7)
inf = float('inf')
mod = 10**9+7
ans = inf ;count = 0 ;pro = 1

a,b=map(int,input().split())
s=input()
for i in range(a):
    if s[i]=="-":
        print("No")
        exit()
if s[a]!="-":
    print("No")
    exit()
for i in range(a+1,a+b+1):
    if s[i] == "-":
        print("No")
        exit()
print("Yes")

Solution (Python):

import sys, math, itertools, heapq, collections, bisect, string
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
sys.setrecursionlimit(10**7)
inf = float('inf')
mod = 10**9+7
ans = inf ;count = 0 ;pro = 1

a,b=map(int,input().split())
s=input()
for i in range(a):
    if s[i]=="-":
        print("No")
        exit()
if s[a]!="-":
    print("No")
    exit()
for i in range(a+1,a+b+1):
    if s[i] == "-":
        print("No")
        exit()
print("Yes")

Solution (Python):
A, B = map(int, input().split())
S = input()
a = ['0','1','2','3','4','5','6','7','8','9']
for i in range(A+B):
    if (i == A and S[i] == '-') or (i != A and S[i] in a):
        continue
    else:
        print('No')
        exit()
print('Yes')

Solution (Python):
a,b = map(int, input().split())
c = input()
if c[a] == "-" and all(i!="-" for i in c[:a]) and all(j!="-" for j in c[a+1:]):
    print("Yes")
else:
    print("No")

Solution (Python):
a,b = map(int,input().split())
s = list(input())
ans = "No"
if not "-" in s[0:a] and s[a] == "-" and not "-"  in s[a+1:]:
  ans = "Yes"





print(ans)

Solution (Python):
r=lambda:map(int,input().split())
import sys
a,b=r()
s=input()
if s[a]!='-':
  print("No")
  sys.exit(0)

d='0123456789'
for i in range(len(s)):
  if i==a: continue
  if s[i] not in d:
    print("No")
    sys.exit(0)
    
print("Yes")

Solution (Python):
a, b = map(int, input().split())
s = str(input())

ans = 'No'
if s[a] == '-' and s[:a].isdigit() and s[a+1:].isdigit():
    ans = 'Yes'

print(ans)

Solution (Python):
a,b=map(int,input().split())
s=input()
f=0
for i in s:
    if i=="-":
        f+=1
if len(s)==(a+b+1) and s[a]=="-" and f==1:
    print("Yes")
else:
    print("No")

Solution (Python):

from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations
import sys
import bisect
import string
import math
import time
from fractions import gcd



from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations
import sys
import bisect
import string
import math
import time
from fractions import gcd



def I(): return int(input())


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


def LI(): return [int(i) for i in input().split()]


def LI_(): return [int(i)-1 for i in input().split()]


def StoI(): return [ord(i)-97 for i in input()]


def ItoS(nn): return chr(nn+97)


def input(): return sys.stdin.readline().rstrip()


def show(*inp, end='\n'):
    if show_flg:
        print(*inp, end=end)


YN = ['Yes', 'No']
MOD = 10**9+7
inf = float('inf')
IINF = 10**19
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
sys.setrecursionlimit(10**6)


show_flg = False



def main():
    A, B = MI()
    S = input()

    if len(S) != A + B + 1:
        print('No')
        
        return

    for i in range(len(S)):
        if i == A and S[i] != '-':
            print('No')
            
            return
        elif i != A and S[i] not in ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']:
            print('No')
            
            return

    print('Yes')


if __name__ == '__main__':
    main()

Solution (Python):
ls=['0','1','2','3','4','5','6','7','8','9']
a,b=[int(s) for s in input().split()]
S=input()
if S[a]=='-':
  for i in range(a):
    if not(S[i] in ls):
      print('No')
      break
  else:
    for j in range(b):
      if not(S[a+j+1] in ls):
        print('No')
        break
    else:
      print('Yes')
else:
  print('No')

Solution (Python):
a, b = map(int, input().split())
ls_s = list(map(str, input().split("-")))

if a == len(ls_s[0]) and b == len(ls_s[1]):
    print("Yes")
else:
    print("No")

Solution (Python):
a,b = map(int, input().split())
s = input()

s1 = s[:a]
s2 = s[a]
s3 = s[-b:]

if s2 != '-':
    print('No')
    quit()
try:
    i1 = int(s1)
    i2 = int(s3)
except:
    print('No')
    quit()
print('Yes')

Solution (Python):
import sys
a,b=input().split()
a,b=int(a),int(b)
s=input().rstrip()
if len(s)!=a+b+1:
    print("No")
    sys.exit()
elif s[a]!="-":
    print("No")
    sys.exit()
k=0
list=["0","1","2","3","4","5","6","7","8","9"]
while k<a:
    if s[k] in list:
        pass
    else:
        print("No")
        sys.exit()
    k+=1
k+=1
while k<=a+b:
    if s[k] in list:
        pass
    else:
        print("No")
        sys.exit()
    k+=1
print("Yes")

Solution (Python):
A, B = map(int, input().split())

S = input()

for i in range(len(S)):
    if i == A:
        if S[i] != "-":
            print("No")
            exit()
    else:
        if S[i] == "-":
            print("No")
            exit()
            
print("Yes")

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

Solution (Python):
import re
AB = list(map(int,input().split()))
A=AB[0]
B=AB[1]
S=input()

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

Solution (Python):
a,b = map(int,input().split())

s = input()

ans = 0

if s[a]=='-':
	for i in range(a):
		
		if s[i]== '-':
			ans = ans + 1
			
	for j in range(b):
		
		if s[a+j+1]=='-':
			ans = ans + 1
			
else:
	ans = ans + 1
	
print('Yes' if ans==0 else 'No')

Solution (Python):

A, B = map(int,input().split())
S = input()
num = [chr(ord('0') + i) for i in range(10)]
judge = 1

for i in range(len(S)):
    if i == A:
        if S[i] == "-":
            pass
        else:
            judge = 0
    else:
        if S[i] in num:
            pass
        else:
            judge = 0
            
if judge == 1:
    print("Yes")
else:
    print("No")

Solution (Python):
A, B = map(int, input().strip().split())
S = input().strip()

if S.count("-") == 0 or S.count("-") >= 2:
  print("No")
else:
  if not S[A] == "-":
    print("No")
  else:
    tmp = S.split("-")
    if len(tmp[0]) >= 1 and len(tmp[1]) >= 1:
      print("Yes")
    else:
      print("No")

Solution (Python):
a,b = map(int,input().split())
s = list(input())

num = [str(i) for i in range(10)]

if len(s) != a+b+1:
    print("No")
    import sys
    sys.exit()
for ss in s[:a]+s[a+1:]:
    if ss not in num:
        print("No")
        import sys
        sys.exit()

if s[a] != "-":
    print("No")
    import sys
    sys.exit()

print("Yes")

Solution (Python):
A, B = map(int, input().split())
S = input()

flag = True
for i in range(A+B+1):
  if i == A:
    if S[i] != '-':
      flag = False
  else:
    if not S[i].isdecimal():
      flag = False
if flag:
  print("Yes")
else:
  print("No")

Solution (Python):
def two_int():
    N, K = map(int, input().split())
    return N,K

def one_int():
    return int(input())

def one_str():
    return input()

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

A,B=many_int()

S=one_str()

flg=False
if S[A]=="-":
    temp = S[:A-1] + S[A+1:]
    if temp.isdecimal() and len(S) == A+B+1:
        flg=True

if flg:
    print("Yes")
else:
    print("No")

Solution (Python):
a,b =map(int,input().split())
s = input()

if str.isnumeric(s[:a]) and \
   str.isnumeric(s[a+1:a+b+1]) and \
   s[a]=='-':  
  print('Yes')
else:
  print('No')

Solution (Python):
A,B = (int(i) for i in input().split())
S = str(input())
if S[A] != "-" or "-" in S[:A] or "-" in S[-B:]:
    print('No')

else:
    print('Yes')

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

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

Solution (Python):


A,B=list(map(int,input().split(" ")))
S=input().split("-")

if len(S[0])==A and len(S[1])==B: 
    print("Yes")
else: 
    print("No")

Solution (Python):
import sys
a,b=map(int,input().split())
s=input()
for i in range(a):
    if s[i]=='-':
        print('No')
        sys.exit()
if  s[a]!='-':
    print('No')
    sys.exit()
for i in range(b):
    if s[i+a+1]=='-':
        print('No')
        sys.exit()
print('Yes')

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

Solution (Python):
A, B = list(map(int, input().split()))
S = input()
ans = S[A]=='-'
for c in S[:A  ]: ans = ans and (c in '0123456789')
for c in S[A+1:]: ans = ans and (c in '0123456789')
print('Yes' if ans else 'No')

Solution (Python):











import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,log 
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    A,B = MI()
    S=ST()
    for i,s in enumerate(S):
        ok = True
        if i < A:
            if s=="-":
                ok = False
        elif i==A:
            if s!="-":
                ok = False
        else:
            if s=="-":
                ok = False
        if not ok:
            print("No")
            exit()
    print("Yes")
if __name__ == '__main__':
    main()

Solution (Python):
def main():
    A, B = map(int, input().split())
    S = list(input().split("-"))

    if len(S[0]) == A and len(S[1]) == B:
        print('Yes')
    else:
        print('No')


main()

Solution (Python):
def judge(S,A,B):
  a = list(S)
  front = a[0:A]
  back = a[A+1:A+B+1]
  lst = ["0","1","2","3","4","5","6","7","8","9"]
  for i in range(A):
    if front[i] not in lst:
      print("No")
      return
            
  for j in range(B):
    if back[j] not in lst:
      print("No")
      return
            
  if a[A]!="-":
    print("No")
    return
  
  print("Yes")
  
A,B = map(int,input().split())
S = input()
judge(S,A,B)

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

Solution (Python):
A, B = map(int, input().split())
S = input()

if S[A] == "-" and S.count("-") == 1:
    ans = "Yes"
else:
    ans = "No"

print(ans)

Solution (Python):
a, b = [int(x) for x in input().split()]
s = input()
if s[a] == "-" and len(s) == (a+b+1) and (s[:a]+s[a+1:]).isdigit():
  print("Yes")
else:
  print("No")

Solution (Python):
import re
a, b = map(int, input().split())
s = input()
if re.search('\d+',s[:a]) and s[a] == "-" and re.search('\d+',s[a+1:]):
	print ("Yes")
else:
	print ("No")

Solution (Python):
a,b = map(int, input().split())
s = input()

first = s[:a]
hyphen = s[a]
second = s[a+1:]

if len(second) == b and hyphen == "-":
  try:
    int(first)
    int(second)
    print("Yes")
  except:
    print("No")
    
else:
  print("No")

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

Solution (Python):

A,B = map(int, input().split())
S = str(input())

if S[A]!="-":
    print("No")
else:
    for i in range(len(S)):
        if (i<A or i>A) and S[i].isdecimal()!=True:
            print("No")
            break
    else:
        print("Yes")

Solution (Python):
a, b = map(int, input().split())
s = input('')

if len(s) == (a+b+1) and s[a]== '-'  and s.count('-') ==1:
    print('Yes')
else:
    print('No')

Solution (Python):
from sys import stdin
from itertools import combinations
from math import factorial
import numpy as np
import math

a,b = [int(x) for x in stdin.readline().rstrip().split()]
s = stdin.readline().rstrip()

if s[a] != "-":
    print("No")
elif "-" in s[:a] or "-" in s[a+1:]:
    print("No")
else:
    print("Yes")

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

Solution (Python):
a, b = map(int, input().split())
s = input()
if s[a] == "-" :
    try :
        if (isinstance(int(s[:a]),int)) and (isinstance(int(s[a+1:]),int)) :
            print("Yes")
        else :
            print("No")
    except :
        print("No")
else :
    print("No")

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

Solution (Python):
a, b = map(int,input().split())
c = str(input())
p = c.split('-')
if len(p[0]) == a and len(p[1]) == b:
  print('Yes')
else:
  print('No')

Solution (Python):
def examB():
    A, B = LI(); St = S()
    nums = list(map(str, range(10)))
    ans = "Yes"
    if St[A] == "-":
        for s in St[:A] + St[A + 1:]:
            if s not in nums:
                ans = "No"
                break
    else:
        ans = "No"
    print(ans)


import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examB()

Solution (Python):
A,B = map(int,input().split())
S = input()
ans = True
for i in range(len(S)):
    if(i == A):
        if(S[i] != "-"):
            ans = False
    else:
        if(S[i].isdigit() != True):
            ans = False
if(len(S) != A + B + 1):
    ans = True
if(ans):
    print("Yes")
else:
    print("No")

Solution (Python):
n, y = map(int, input().split())
bangou = input()

a_list = bangou.split('-')
if len(a_list) != 2:
    print('No')
elif len(a_list[0]) != n or len(a_list[1]) != y:
    print('No')
else:
    print('Yes')

Solution (Python):
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")

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

Solution (Python):
ab = [int(x) for x in input().split()]
s = input()
if s.count('-')!=1:
  print("No")
elif len(s[:s.index('-')])==ab[0] and len(s[s.index('-')+1:])==ab[1]:
  print("Yes")
else:
  print("No")

Solution (Python):
A,B=map(int,input().split())
S=str(input())
if S[A]!="-" or S.count("-")!=1:
    print('No')
else:
    S_prime=S.split("-")
    S_leng=[len(str(i)) for i in S_prime]
    if S_leng==[A,B]:
        print('Yes')
    else:
        print('No')

Solution (Python):
A, B = map(int, input().split())
S = list(input())
nums = list(map(str, range(10)))
if S[A] == "-":
    for char in S[:A] + S[A + 1:]:
        if char not in nums:
            print("No")
            break
    else:
        print("Yes")

else:
    print("No")

Solution (Python):
A,B=map(int,input().split())
S=input()

flg_haihun="-" not in (S[0:A]+S[A+1:A+B+1])

print("Yes" if A+B+1==len(S) and flg_haihun and S[A]=="-" else "No")

Solution (Python):

characters = '0123456789-'

a, b = [int(s) for s in input().split()]
s = input()

is_postal = 'Yes'

if s[a] != '-' or s.count('-') != 1:
    is_postal = 'No'

for c in s:
    if c not in characters:
        is_postal = 'No'

print(is_postal)

Solution (Python):
a,b=map(int,input().split())
p=input()
frag=True
if len(p)!=a+b+1 or p.count("-")!=1:
    frag=False
if p[a]!="-":
    frag=False
print("Yes" if frag==True else "No")

Solution (Python):
A,B=map(int,input().split())
S=list(input())
Z=['0','1','2','3','4','5','6','7','8','9']
for i in range(A+B):
    if i!=A and S[i] in Z:
        pass
    elif i!=A:
        print('No')
        break
    elif S[A]!='-':
        print('No')
        break
else:
    print('Yes')

Solution (Python):
a,b=map(int,input().split())
p=input()
frag=True
if len(p)!=a+b+1 or p.count("-")!=1:
    frag=False
if p[a]!="-":
    frag=False
print("Yes" if frag==True else "No")

Solution (Python):
A, B = map(int, input().split())
S = list(str(input()))

ans = 'Yes'

for i in range(A):
  if not str.isdecimal(S[i]):
    ans = 'No'

if S[A] != '-':
  ans = 'No'
  
for i in range(B):
  if not str.isdecimal(S[-1*i-1]):
    ans = 'No'
print(ans)

Solution (Python):


a,b=map(int,input().split())
S=list(input())
ans='Yes'
for i in range(a+b):
    if i==a:
        if S[i]!='-':
            ans='No'
            break
        else:
            continue
    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':
        continue
    else:
        ans='No'
        break
print(ans)

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")

def main():
    a,b=map(int, input().split())
    s=input()
    for c in s[:a]:
        if c.isdecimal():continue
        print("No")
        exit()
    if s[a]!="-":
        print("No")
        exit()
    for c in s[a+1:]:
        if c.isdecimal():continue
        print("No")
        exit()
    print("Yes")


main()

Solution (Python):
a,b = [int(i) for i in input().split()]

s = input()

flg = False
if s[a]  == '-' and (s[:a] + s[a+1:]).isdigit():
    flg = True
print('Yes' if flg else 'No')

Solution (Python):
import re
A, B = map(int, input().split())
S = input()
pattern = '[0-9]{' + str(A) + '}-[0-9]{'+ str(B) + '}'
result = re.search(pattern, S)
print('No') if result == None else print('Yes')

Solution (Python):
a,b=map(int, input().split())
s=list(input())

if s[a]!="-":
  print("No")
  exit()
  
for i in range(a):
  if s[i]=="-":
    print("No")
    exit()

for i in range(b):
  if s[a+1+i]=="-":
    print("No")
    exit()

print("Yes")

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

Solution (Python):
a,b = map(int,input().split())
S = input()
ans = True
for s in range(a+b+1):
    if s == a:
        if S[s] != "-":
            ans = False
    if s != a:
        if S[s] == "-":
            ans = False
if ans:print("Yes")
else:print("No")

Solution (Python):
a, b = map(int, input().split())
s = list(input())

for i in range(a+b+1):
    if i < a:
        if s[i] == '-':
            print('No')
            exit()
        else:
            continue
    elif i == a:
        if s[i] != '-':
            print('No')
            exit()
        else:
            continue
    else:
        if s[i] == '-':
            print('No')
            exit()
        else:
            continue

print('Yes')

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

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

Solution (Python):
a,b=map(int,input().split())
s=input()
y=0

for i in range(a):
    if s[i] not in ["0","1","2","3","4","5","6","7","8","9"]:
        y+=1
if s[a]!="-":
    y+=1
for i in range(a+1,a+b+1):
    if s[i] not in ["0","1","2","3","4","5","6","7","8","9"]:
        y+=1

if y==0:
    print("Yes")
else:
    print("No")

Solution (Python):
a,b=map(int,input().split())
s=input()
if s[a]!="-":
  print("No")
elif "-" in s[:a] or "-" in s[a+1:]:
  print("No")
else:
  print("Yes")

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

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

Solution (Python):
import sys


import string





def main():
    a, b = (int(x) for x in sys.stdin.readline().split())
    s = sys.stdin.readline().rstrip()
    if s[a] == '-':
        s_a, s_b = s[:a], s[a+1:]
        for i in s_a:
            if not i in string.digits:
                f_a = False
                break
        else:
            f_a = True
            for i in s_b:
                if not i in string.digits:
                    f_b = False
                    break
            else:
                f_b = True
    else:
        print('No')
        exit()
    
    print('Yes' if f_a and f_b else 'No')

if __name__ == "__main__":
    
    main()

Solution (Python):
a,b = map(int,input().split())
s = input()
lis = [str(i) for i in range(10)]
for i in range(a+b+1):
  if i==a:
    if s[i]!="-":
      print("No")
      break
  else:
    if s[i] not in lis:
      print("No")
      break
else:
  print("Yes")

Solution (Python):
a, b = map(int, input().split())
s = input()
if s[:a].isdecimal() and s[a] == "-" and s[-b:].isdecimal():
  print("Yes")
else:
  print("No")

Solution (Python):
a, b = map(int, input().split())
s0 = input()
s = [x for x in s0]

if len(s) != a + b + 1:
  print('No')
  exit()
if s[a] != '-':
  print('No')
  exit()
for i in range(a):
  if s[i] == '-':
    print('No')
    exit()
for i in range(a+1, a+b):
  if s[i] == '-':
    print('No')
    exit()
print('Yes')

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

Solution (Python):
A, B = map(int, input().split())
S = list(input())
n = len(S)

if n != A+B+1:
    print('No')
    exit()
for i in range(n):
    if i == A:
        if S[i] == '-':
            continue
        else:
            break
    if not S[i].isdigit():
        break
else:
    print('Yes')
    exit()
print('No')

Solution (Python):
a,b=map(int,input().split())
s=input()

x=s[:a]
y=s[-b:]
ans=False
if s[a]=='-':
    if x.count('-') < 1 and y.count('-') < 1:
        ans=True

if ans:
    print('Yes')
else:
    print('No')

Solution (Python):
A, B = map(int, input().split())
S = input()
for i in range(len(S)):
  if i == A:
    if S[i] != '-':
      print('No')
      exit()
  else:
    if not S[i].isdecimal():
      print('No')
      exit()
print('Yes')

Solution (Python):
a,b = map(int,input().split())
s = input()
num = ['0','1','2','3','4','5','6','7','8','9']
for i in range(len(s)):
  if a == i:
    if s[i] != '-':
      print('No')
      break
  else:
    if s[i] not in num:
      print('No')
      break
else:
  print('Yes')

Solution (Python):
a, b = map(int, input().split())
s = input()

num = [str(x) for x in range(10)]

flag = False

if s[a] == "-":
    list_s = list(s)
    del list_s[a]
    if all([x in num for x in list_s]):
        flag = True
print("Yes" if flag else "No")

Solution (Python):
A,B = map(int,input().split())
S = input()
ans = "Yes"
flag1 = 0
flag2 = 0
if S[A] != "-":
    ans = "No"
else:
    for i in range(A):
        if S[i] == "-":
            ans = "No"
            flag1 = 1
            break
    for j in range(A+1,A+B+1):
        if S[j] == "-":
            ans = "No"
            flag2 = 1
            break
print(ans)