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):
import sys
A, B = map(int, input().split())
S = list(input())
for i in range(A):
    if not S[i].isdecimal():
        print('No')
        sys.exit()
if S[A] != '-':
    print('No')
    sys.exit()
for i in range(B):
    if not S[A + 1 + i].isdecimal():
        print('No')
        sys.exit()
print('Yes')

Solution (Python):
A,B=map(int,input().split())
n=str(input())
numbers=['1','2','3','4','5','6','7','8','9','0']
if n[A]!='-':
    print('No')
    exit()
for i in range(A):
    if not(n[i] in numbers):
        print('No')
        exit()
for j in range(B):
    if not(n[j+A+1] in numbers):
        print('No')
        exit()

print('Yes')

Solution (Python):
import re
A, B = map(int, input().split())
S = input()
print("Yes" if re.fullmatch(r"\d{"+str(A)+r"}-\d{"+str(B)+r"}", S) else "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):
import sys
def input(): return sys.stdin.readline().strip()


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


if __name__ == "__main__":
    main()

Solution (Python):
import sys

A,B=map(int,input().split())
S=input()
if S[A]!='-':
  print('No')
  sys.exit()

try:
  int(S[:A])
  int(S[A+1:])
except:
  print('No')
  sys.exit()
print('Yes')

Solution (Python):
MM = input().split()
A = int(MM[0])
B = int(MM[1])
S = input()
SS = '1234567890'
SSS =list(SS)
count = 0
for i in range(A):
  if S[i] not in SSS:
    count +=1
if S[A] != '-':
  count +=1
for i in range(A+1,A+B):
  if S[i] not in SSS:
    count +=1
if count ==0:
  print('Yes')
else:
  print('No')

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

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

Solution (Python):
import re
A, B = map(int,input().split())
S = input()
m = '^[0-9]{' + str(A) + '}-[0-9]{' + str(B) +'}$'
if re.match(m, S):
    print("Yes")
else:
    print("No")

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

if len(s) != a + b + 1:
    print('No')
elif s[a] != '-':
    print('No')
elif s[0:a].isdecimal() == False:
    print('No')
elif s[(a + 1):].isdecimal() == False:
    print('No')
else:
    print('Yes')

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

Solution (Python):
p = input().split()
a = int(p[0])
b = int(p[1])

v = input()
s = list(v)

answer = False

for i in range(len(s)):
    q = s[i]
    if i == a:
        if q == '-':
            answer = True
        else:
            answer = False
            break
    else:
        if q == '-':
            answer = False
            break
        else:
            answer = True

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

Solution (Python):
a, b = map(int, input().split())
s = input().split('-')
if len(s)!=2:
    print('No')
    exit()

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

Solution (Python):


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

index = S.find("-")
if S.count("-") != 1:
    print("No")
    exit(0)
if index == -1:
    print("No")
    exit(0)
if len(S[:index]) != A:
    print("No")
    exit(0)
if len(S[index+1:]) != B:
    print("No")
    exit(0)

print("Yes")

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

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

Solution (Python):

import sys
sys.setrecursionlimit(10 ** 5)
input = sys.stdin.readline
mod = 1000000007
inf = float("INF")
def I(): return int(input().rstrip())
def IR(n): return [I() for _ in range(n)]
def LI(): return list(map(int, input().rstrip().split()))
def LIR(n): return [LI() for _ in range(n)]
def LI_(): return list(map(lambda x: int(x) - 1, input().rstrip().split()))
def LIR_(n): return [LI_() for _ in range(n)]
def F(): return float(input().rstrip())
def FR(n): return [F() for _ in range(n)]
def LF(): return list(map(float, input().rstrip().split()))
def LFR(n): return [LI() for _ in range(n)]
def S(): return input().rstrip()
def SR(n): return [S() for _ in range(n)]
def LS(): return list(sys.stdin.readline().rstrip().split())
def LSR(n): return [LS() for _ in range(n)]


a, b = LI()
s = S()
if s.count('-') == 1 and a == s.find('-') and b == len(s) - s.find('-') - 1:
    print('Yes')
else:
    print('No')

Solution (Python):
A, B = map(int, input().split())
S = input()
jdg = True
for i, s in enumerate(S):
    if i != A and s not in '0123456789':
        jdg = False
        break
    if i == A and s != '-':
        jdg = False
print('Yes' if jdg else 'No')

Solution (Python):
a,b=map(int,input().split())
s=input()
ans="Yes"
for i in range(a+b+1):
    if i<a or i>a:
        if s[i].isdecimal()==False:
            ans="No"
    if i==a:
        if s[i]!="-":
            ans="No"
print(ans)

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

x = s[:a].isdecimal()
if s[a] == "-":
  y = True
else:
  y = False
z = s[a+1:].isdecimal()

if x and y and z == True:
  print("Yes")
else:
  print("No")

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

Solution (Python):

A, B = input().split(' ')
A = int(A)
B = int(B)
S = input()
if not '-' in S:
  print('No')
else:
  S = S.split('-')
  if '-' in S[0] or '-' in S[1]:
    print('No')
  elif 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 = str(input())

if s[A] != '-':
    print("No")
    sys.exit()
elif '-' in s[:A] or '-' in s[A+1:A+B+1]:
    print("No")
else:
    print("Yes")

Solution (Python):

import sys
A,B = map(int,input().split())
S = input()
Ans = "No"
if S[A] != "-":
    print(Ans)
    sys.exit()
    
for i in range(A):
    if S[i] == "-":
        print(Ans)
        sys.exit()

for i in range(A+1,A+B+1):
    if S[i] == "-":
        print(Ans)
        sys.exit()

Ans = "Yes"
print(Ans)

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 = input()
ans = "Yes"
for i in range(len(S)):
  if i == A:
    if S[i] != "-":
      ans = "No"
  else:
    if S[i] == "-":
      ans = "No"
print(ans)

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

ok = True
for i in range(A+B+1):
  s = S[i]
  if i == A and s != '-':
    ok = False
    break
  
  if i != A and s == '-':
    ok = False
    break
    
if ok:
  print("Yes")
else:
  print("No")

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

Solution (Python):
A, B = map(int, input().split())
S = input()
f = True
for a in S[:A]:
    if not a.isdecimal():
        f = False
if S[A] != "-":
    f = False
for b in S[A+1:]:
    if not b.isdecimal():
        f = False
if f:
    print("Yes")
else:
    print("No")

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

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

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

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

Solution (Python):
a,b=map(int,input().split())
s=input()
flag=True
for i in range(len(s)):
    if i==a:
        if s[i]!='-':
            flag=False
            break
        continue
    if not(s[i]>='0' and s[i]<='9'):
        flag=False
        break
print("Yes") if flag else print("No")

Solution (Python):
import sys

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

for i, j in enumerate(s):
    if i == a:
        if j != '-':
            print('No')
            sys.exit()
    elif j.isdigit():
        continue
    else:
        print('No')
        sys.exit()
print('Yes')

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

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

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

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

if not s[:a].isdigit() or not s[a]=='-' or  not s[a+1:].isdigit():
    print("No")
else:
    print("Yes")

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

result = True
for i in range(len(sn)):
  if (i == a+1-1) and (sn[i] != "-"):
    result = False
    break
  else :  
    if (i != a+1-1) and ( ord(sn[i]) < 48) or ( 57 < ord(sn[i])):
      result = False
      break

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

Solution (Python):


import re

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

text = '[0-9]{' + str(A) + '}-[0-9]{' + str(B) + '}'
pattern = re.compile(text)
matchobj = pattern.match(S)

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

Solution (Python):
A, B = map(int, input().split())
S = list(map(str, input().split("-")))
ans = "No"
if A == len(S[0]):
    if B == len(S[1]):
        ans = "Yes"
print(ans)

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):
import re
A, B = list(map(int, input().split()))
S = input()
if re.match(r'[0-9]{' + str(A) + r'}-[0-9]{' + str(B) + r'}', S):
    print('Yes')
else:
    print('No')

Solution (Python):
import sys,re
input = sys.stdin.readline

a,b=list(map(int,input().split()))
s=input().rstrip()
rs = r"\d"*a+"-"+"\d"*b
print('Yes'if re.match(rs,s) else 'No')

Solution (Python):

import re
a, b, s = open(0).read().split()
r = "^\d{" + a + "}-\d{" + b + "}$"
print("YNeos"[re.findall(r, s) == []::2])

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
            break
    else:
        if s[i] =='-':
            Flag=False
            break 
if Flag:
    print('Yes')
else:
    print('No')

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

Solution (Python):
a,b = map(int,input().split())
s = input()
for i in range(a):
    if s[i] == '-':
        print('No')
        exit(0)

if s[a] != '-':
    print('No')
    exit(0)

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

print('Yes')

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

Solution (Python):

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


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

Solution (Python):
import sys
sys.setrecursionlimit(4100000)
import math
INF = 10**9

def main():
    a,b = map(int, input().split())
    S = input()

    for i in range(a+b+1):
        if i == a:
            if S[a]!='-':
                print('No')
                return
        else:
            if S[i]=='-':
                print('No')
                return
    print('Yes')


if __name__ == '__main__':
    main()

Solution (Python):
from sys import exit

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())
flag = 0
S = list(input())
if S[A] != "-":
    print("No")
else:
    if "".join(S[:A]).isdigit() and "".join(S[A+1:]).isdigit():
        print("Yes")
    else:
        print("No")

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

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

if s[a] != "-":
    print("No")
elif len(s.split("-")) != 2:
    print("No")
else:
    h = s.split("-")
    if len(h[0]) == a and len(h[1]) == b:
        print("Yes")
    else:
        print("No")

Solution (Python):
a,b,s = open(0).read().split()

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

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

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

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

if str.isdecimal(S[:A]) and S[A]=="-" and str.isdecimal(S[A+1:]) and len(S[A+1:])==B:
    print("Yes")
else:
    print("No")

Solution (Python):
A, B = map(int,input().split())
S = input()
r = 'Yes'
for i in range(len(S)):
  if i == A:
    jo = ['-']
  else:
    jo = ['0','1','2','3','4','5','6','7','8','9']
  
  if not S[i] in jo:
    r = 'No'
    break
print(r)

Solution (Python):
a,b=map(int,input().split())
s=input()
han=0
for i in range(a):
  if s[i].isdecimal() ==False:
    han +=1
    
for i in range(a+1,a+b+1):
  if s[i].isdecimal() ==False:
    han +=1
if s[a]!='-':
  han +=1

if han ==0:
  print('Yes')
else:
  print('No')

Solution (Python):
import math
def main():
  a,b = list(map(int,input().split()))
  s=input()
  if s[a]=='-' and s[:a].isdigit() and s[a+1:].isdigit():
    print("Yes")
  else:
    print("No")
main()

Solution (Python):
def actual(a, b, s):
    if s[a] != '-':
        return 'No'

    for i in range(0, a):
        if not '0' <= s[i] <= '9':
            return 'No'

    for j in range(a + 1, len(s)):
        if not '0' <= s[j] <= '9':
            return 'No'

    return 'Yes'


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

print(actual(a, b, s))

Solution (Python):
import re


def actual(a, b, s):
    pattern = r'\d{' + f'{a}' + r'}-\d{' + f'{b}' + '}'
    
    if re.fullmatch(pattern, s):
        return 'Yes'

    return 'No'

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

print(actual(a, b, s))

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

flag = 0


if s[a] == "-":
    if s[:a].isdecimal() and s[a+1:].isdecimal():
        flag = 1
    else:
        flag = 0


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

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

for i in range(a+b+1):
  if i == a:
    if s[i] != "-":
      print("No")
      exit()
  else:
    if s[i].isdigit() == False:
      print("No")
      exit()
print("Yes")

Solution (Python):










import sys

def input(): return sys.stdin.readline().rstrip()
def iIn(): return int(input())
def iInM(): return map(int, input().split())
def iInM1(): return map(int1, input().split())
def iInLH(): return list(map(int, input().split()))
def iInLH1(): return list(map(int1, input().split()))
def iInLV(n): return [iIn() for _ in range(n)]
def iInLV1(n): return [iIn()-1 for _ in range(n)]
def iInLD(n): return [iInLH() for _ in range(n)]
def iInLD1(n): return [iInLH1() for _ in range(n)]
def sInLH(): return list(input().split())
def sInLV(n): return [input().rstrip('\n') for _ in range(n)]
def sInLD(n): return [sInLH() for _ in range(n)]

def OutH(lst, deli=' '): print(deli.join(map(str, lst)))
def OutV(lst): print('\n'.join(map(str, lst)))

sys.setrecursionlimit(10 ** 6)

int1 = lambda x: int(x) - 1

INF = int(1e9)
MOD = 1000000007
dx = (-1, 0, 1, 0)
dy = (0, -1, 0, 1)


A, B = iInM()
S = input()

ans = 'Yes'
for i in range(len(S)):
    if i == A:
        if S[i] != '-':
            ans = 'No'
            break
    else:
        if not S[i].isdigit():
            ans = 'No'
            break

print(ans)

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

f = True
if s[a]!='-':
    f = False
if not s[:a].isnumeric() and s[a+1:].isnumeric():
    f = False
if '-' in s[:a]+s[a+1:]:
    f = False
if f:
    print('Yes')
else:
    print('No')

Solution (Python):
A,B = map(int,input().split())
S = input()
num = ['0','1','2','3','4','5','6','7','8','9']
ans = True
if len(S)==(A+B+1):
    for i in range(len(S)):
        if i == A:
            if S[i] == '-':
                pass
            else:
                ans = False
                break
        else:
            if S[i] in num:
                pass
            else:
                ans = False
                break
else:
    ans = False

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

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

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

if not (1 <= A <= 5 and 1 <= B <= 5):
    sys.exit()

if len(S) != (A + B + 1):
    sys.exit()

for I in range(len(array_S)):
    if I == A:
        continue
    if not array_S[I].isdecimal():
        print('No')
        sys.exit()

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

Solution (Python):
a, b = map(int, input().split())
s = input()
try:
    A = int(s[:a])
    B = int(s[b:])
    if s[a] == '-':
        print('Yes')
    else:
        print('No')
except:
    print('No')

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

cond = True

if not s[:a].isnumeric():
    cond = False

if not s[a] == "-":
    cond = False

if not s[a+1:].isnumeric():
    cond = False

print("Yes" if cond else "No")

Solution (Python):
a,b = map(int, input().split())
s = input()
flg = 1
for i in range(len(s)):
    if i == a: continue
    elif '0' <= s[i] <= '9': flg = 1
    else: 
        flg = 0
        break

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

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

N={"0","1","2","3","4","5","6","7","8","9"}
F=True
for i in range(A+B+1):
    if i!=A:
        F&=(S[i] in N)
    else:
        F&=(S[i]=="-")

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

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

def isint(str):
    try: int(str)
    except: return False
    return True

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

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

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

Solution (Python):
A,B = map(int,input().split())
S = input()
S1= S[:A]
S2 = S[A]
S3 = S[A+1:]

if S1.isdecimal() == 1 and S2 == '-' and S3.isdecimal() == 1:
    print('Yes')
else:
    print('No')

Solution (Python):









import sys
input = sys.stdin.readline

A, B = map(int, input().split())
list_n = list(map(str, input().rstrip('\n').split("-")))


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

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

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

Solution (Python):
a,b=map(int,input().split())
s=input()
lst=["1","2","3","4","5","6","7","8","9","0"]
if len(s)==a+b+1:
    if s[a]=="-":
        switch=1
        for i in range(a+b+1):
            if i!=a:
                if not s[i] in lst:
                    switch=0
                    break
        if switch==1:
            print("Yes")
            exit()
        
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")
      break
  else:
    if not "0" <= s[i] <= "9":
      print("No")
      break
else:
  print("Yes")

Solution (Python):
A, B = map(int, input().split())
S = input()
res = 'Yes'
if not S[:A].isdecimal() or not S[A+1:].isdecimal() or S[A] != '-':
    res = 'No'

print(res)

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

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()
if(s[a]=='-'):
    t = s[:a] + s[a+1:a+b]

    if(t.isdigit()==True):
        print("Yes")
    else:
        print("No")
else:
    print("No")

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()
a='Yes'
for i in range(A+B+1):
  if i==A:
    if S[i]!='-':
      a='No'
  else:
    if S[i]=='-':
      a='No'
print(a)

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

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

for i in range(len(S)):
    if i <= A-1:
        if S[i] not in [str(i) for i in range(10)]:
            print('No')
            exit()
    if i == A:
        if S[i] != '-':
            print('No')
            exit()
    else:
        if S[i] not in [str(i) for i in range(10)]:
            print('No')
            exit()

print('Yes')

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


def is_digit(num):
    try:
        int(num)
        return True
    except ValueError:
        return False


a = S[:A]
x = S[A]
b = S[A+1:]

if x == "-":
    for num in [a, b]:
        if not is_digit(num):
            print("No")
            break
    else:
        print("Yes")
else:
    print("No")

Solution (Python):
import string

a, b = map(int, input().split())
s = list(input())
flag = True
hyphen_count = s.count("-")

if "-" in s and hyphen_count == 1:
  hyphen_position = s.index("-")
  
  for i in range(len(s)):
    if not s[i] in string.digits and i != hyphen_position:
      flag = False
    elif a != len(s[0:hyphen_position]):
      flag = False
    elif b != len(s[hyphen_position + 1:len(s)]):
      flag = False
    
else:
  flag = False

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

Solution (Python):
A,B=map(int,input().split())
s=input()
S=[s[i] for i in range(len(s))]
N=A+B+1
c=0
num={str(i) for i in range(10)}
if S[A]=='-' and len(S)==N:
  c=1
  S.pop(A)
  for i in range(N-1):
    if 1-(S[i] in num):
      c=0
if c==1:
  print('Yes')
else:
  print('No')

Solution (Python):
import sys
a,b = map(int,input().split())
s = list(input())
if s[a] != "-":
	print("No")
	sys.exit()
s[a] = 1
if not "-" in s:
	print("Yes")
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 = input()
ans = True
if S[A] != '-':
    ans = False
for i in range(len(S)):
    if i == A:
        continue
    if S[i] == '-':
        ans = False
if ans:
    print('Yes')
else:
    print('No')

Solution (Python):
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7

A, B = I()
S = list(input().split("-"))
n = len(S)

if n != 2:
    print("No")
else:
    a = len(S[0])
    b = len(S[1])
    if A == a and B == b:
        print("Yes")
    else:
        print("No")

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

p = f"\d{{{A}}}-\d{{{B}}}"
pattern = re.compile(p)
if pattern.fullmatch(S):
    print('Yes')
else:
    print('No')

Solution (Python):
import sys
A,B=map(int,input().split())
S=input()
for i in range(A):
    try:
        num=int(S[i])
    except:
        print("No")
        sys.exit()
if S[A]!="-":
    print("No")
    sys.exit()
for i in range(B):
    try:
        num=int(S[i+A+1])
    except:
        print("No")
        sys.exit()
print("Yes")

Solution (Python):
def resolve():
    A, B = map(int, input().split())
    S = input()
    C = "1234567890"
    for i in range(A):
        if S[i] in C:
            continue
        else:
            print("No")
            exit()
    if S[A] != "-":
        print("No")
        exit()
    for i in range(A+1, len(S)):
        if S[i] in C:
            continue
        else:
            print("No")
            exit()
    print("Yes")
resolve()

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

Solution (Python):
def resolve():
    N, M = [int(i) for i in input().split()]
    S = input().split(sep="-")
    if len(S) != 2 or len(S[0]) != N or len(S[1]) != M:
        print("No")
    else:
        print("Yes")


resolve()

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

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

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

Solution (Python):
a,b = map(int,input().split())
s = list(input())
n = len(s)
ans = "No"
for i in range(n):
  if s[i] == "-":
    if a == i:
      ans = "Yes"
if s.count("-") > 1:
  ans = "No"
      
print(ans)

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

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

Solution (Python):

import sys, math
from itertools import permutations, combinations
from collections import defaultdict, Counter, deque
from math import factorial
from bisect import bisect_left 
sys.setrecursionlimit(10**7)
enu = enumerate
MOD = 10**9+7
def input(): return sys.stdin.readline()[:-1]
pl = lambda x: print(*x, sep='\n')

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

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

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


check_1 = S[:A].isdecimal()
check_2 = S[A+1:].isdecimal()
check_3 = (S[A:A+1] == "-")

if check_1 & check_2 & check_3:
    print("Yes")
else:
    print("No")

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

Solution (Python):


import sys
input=sys.stdin.readline

def main():
    num="0123456789"
    A,B=map(int,input().split())
    S=input()
    sn=S[:A]+S[A+1:A+B+1]
    y=1
    for i in sn:
        if not i in num:
            y=0
            break
    if S[A]!="-":
        y=0
    if y==1:
        print("Yes")
    else:
        print("No")
    
if __name__=="__main__":
    main()

Solution (Python):
n,m = map(int,input().split())
s = input()

if s.count('-') == 1:
    x,y = s.split('-')
    if x.isdigit and y.isdigit and len(x) == n and len(y) == m:
        print ("Yes")
        exit ()

print ("No")

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

s =input()

intlist = ["0","1","2","3","4","5","6","7","8","9"]

for i in range(a):
    if s[i] in intlist:
        pass
    else:
        print("No")
        exit()

if s[a] != "-":
    print("No")
    exit()
    
for j in range(a+1,a+1+b):
    if s[j] in intlist:
        pass
    else:
        print("No")
        exit()

print("Yes")

Solution (Python):
import re
a, b = [int(x) for x in input().split()]
s = input()
print("Yes" if re.search("\\d{{{}}}-\\d{{{}}}".format(a, b), s) is not None else "No")

Solution (Python):
if __name__ == '__main__':
    b, c = map(int, input().split())
    s = input()
    flag=True
    list = [str(i) for i in range(10)]
    for i in range(b+c+1):
        s1= s[i]
        if i < b:
            if s1 not in list:
                flag=False
        elif i > b:
            if s1 not in list:
                flag=False
        else:
            if s1!="-":
                flag=False

    if flag == True:
        print("Yes")
    else:
        print("No")