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):
def main():
    A, B = map(int, input().split())
    S = input()
    if S[A] != "-":
        print("No")
        return
    for c in S[:A] + S[A+1:]:
        if not ('0' <= c <= '9'):
            print("No")
            return
    print("Yes")


if __name__ == "__main__":
    main()

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

if(len(S) == A+B+1):
 s1 = S[:A]
 s2 = S[A+1:]
 s3 = S[A]
 if('-' in s1):
   judge = -1
 elif('-' in s2):
   judge = -1
 else:
  if((len(s1)==A)and(len(s2)==B)and(s3=='-')):
   judge = 0
  else:
   judge = -1
else:
 judge = -1

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

Solution (Python):

import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

A, B = map(int, input().split())
S = input()[:-1]
ans = "Yes"
if S.count("-") != 1:
    ans = "No"
elif not S[A] == "-":
    ans = "No"
elif len(S) != A+B+1:
    ans = "No"
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):
def check(b):
    if not b:
        print('No')
        exit()
a, b = map(int, input().split())
s = input()
deg = '0123456789'
check(len(s) == a+b+1)
check(s[a] == '-')
for i in range(a+b+1):
    if i != a:
        check(s[i] in deg)
print('Yes')

Solution (Python):

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

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 re
nums=input()
s=input()
pfin=''
for idx,ns in enumerate(nums.split()):
  pttr='{},{}'.format(ns,ns)
  pfin+='\d{'+pttr+'}'
  if idx==0: pfin+='-'
print('Yes' if re.match(pfin,s) is not None else 'No')

Solution (Python):
import re
nums=input()
s=input()
pfin=''
for idx,ns in enumerate(nums.split()):
  pttr='{},{}'.format(ns,ns)
  pfin+='\d{'+pttr+'}'
  if idx==0: pfin+='-'
print('Yes' if re.match(pfin,s) is not None else 'No')

Solution (Python):
a,b=[int(i) for i in input().split()]
s=input()
num=[str(i) for i in range(10)]
result=False
for i in range(len(s)):
    if i==a:
        if s[i]!="-":
            result=True
    else:
        if (s[i] in num)==False:
            result=True
print("No" if result else "Yes")

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

print(ans)

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

Solution (Python):
import re

a, b = map(int, input().split())
s = input()
m = re.match('\d{%d}-\d{%d}' % (a, b), s)
if m:
    print('Yes')
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()
print('Yes') if s.count('-')==1 and s[a]=='-' else print('No')

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

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

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):
a, b = map(int, input().split())
s = input()

no = 0
for i in range(len(s)) :
    if i == a :
        if s[i] != "-" :
            no = 1
    else :
        if s[i] == "-" :
            no = 1

if no == 1 :
    print("No")
else :
    print("Yes")

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

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

if count != 1:
    print("No")
    exit()
else:
    print("Yes")

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

Solution (Python):
import re

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

if re.match("^"+"\\d"*A+"-"+"\\d"*B+"$", S):
  print "Yes"
else:
  print "No"

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

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

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

def isPostalCode( A, B, S ):
    for i in range(A):
        if S[i] == '-': return False
    if S[A] != '-': return False
    for i in range(A+1,A+B):
        if S[i] == '-': return False
    return True

if isPostalCode( A, B, S ): print( 'Yes' )
else: print( 'No' )

Solution (Python):
A, B = [int(x) for x in input().split()]
S = input()

def all_digit(s):
  return all(d.isdigit() for d in s)

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

Solution (Python):
a=int(input()[0]);s=input();print('YNeos'[s.count('-')!=1or'-'<s[a]::2])

Solution (Python):
a=int(input()[0]);s=input();print('YNeos'[s.count('-')!=1or'-'<s[a]::2])

Solution (Python):
a=int(input()[0]);s=input();print('NYoe s'[s.count('-')==1and'0'>s[a]::2])

Solution (Python):
a,b,s=open(0).read().split();a=int(a);print('NYoe s'[s.count('-')==1and'0'>s[a]::2])

Solution (Python):
a,b,s=open(0).read().split();a=int(a);print("NYoe s"[s.count("-")==1and s[a]=="-"::2])

Solution (Python):
a,b,s=open(0).read().split();a=int(a);print("NYoe s"[s.count("-")==1 and s[a]=="-"::2])

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

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

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

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

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

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

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

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

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

Solution (Python):
a = int(input().split()[0])
s = input()
if (s[:a]+s[a+1:]).replace('0','').replace('1','').replace('2','').replace('3','').replace('4','').replace('5','').replace('6','').replace('7','').replace('8','').replace('9','') or s[a] != '-':
    print('No')
else:
    print('Yes')

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

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

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

Solution (Python):
a, b = map(int, input().split())
s = list(input())
ans = 'No'
if s[a] == '-':
    s[a] = '0'
    ans = 'Yes'
for i in s:
    if not i.isdigit():
        ans = 'No'    
print(ans)

Solution (Python):
""" AtCoder """

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

if S[A] != '-':
    print("No")
    exit()

S = S[:A] + S[A+1:]

if '-' in S:
    print("No")
else:
    print("Yes")

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

flg = True

if (len(S) != A + B + 1):
    flg = False
else:
    for i in range(len(S)):
        if i == A and S[i] != '-':
            flg = False
            break
        elif i != A:
            if S[i] < '0' or '9' < S[i]:
                flg = False
                break

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

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

Solution (Python):


















import collections
import math


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

if len(S) == A+B+1 and S[A] == "-" and len([ s for s in S if s in [ str(i) for i in range(10)]]) == A+B:
  print("Yes")
else:
  print("No")

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

d = re.compile("\d+")

if (d.match(S[:A])) and S[A] == "-" and d.match(S[A+1:]):
    print("Yes")

else:print("No")

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

Solution (Python):
from statistics import mean, median,variance,stdev
import numpy as np
import sys
import math
import fractions

def j(q):
    if q==1: print("Yes")
    else:print("No")
    exit(0)


def ct(x,y):
    if (x>y):print("")
    elif (x<y): print("")
    else: print("")

def ip():
    return int(input())



x,y= (int(i) for i in input().split())      



a = input()                                  







for i in range(x):
    if not('0' <=a[i] and a[i] <= '9') :j(0)
if a[x] !='-' : j(0)
for i in range(x+1,y+x+1):
    if not('0' <=a[i] and a[i] <= '9') :j(0)
j(1)

Solution (Python):

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

d = re.compile("\d+")

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

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

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

Solution (Python):
A, B = map(int, input().split())
S = input().rstrip()
if len(S) == A + B + 1 and S[A] == '-':
    for s in (S[:A]+S[A+1:]):
        if s in list(map(str, range(0, 10))):
            continue
        else:
            print('No')
            exit(0)
    print('Yes')
    exit(0)
print('No')
exit(0)

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

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

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

for i in range(len(S)):
    if i == A:
        if S[i] != '-':
            print('No')
            exit(0)
    else:
        if not S[i] in nums:
            print('No')
            exit(0)

print('Yes')

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

if s[a]== '-' and len(s)==a+b+1 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("-") < 2):
  print("Yes")
else:
  print("No")

Solution (Python):
a,b = map(int, input().split())
s = input()
for i,j in enumerate(s):
  if i == a:
    if j != "-":
      print("No")
      exit()
  else:
    if ord("0") <= ord(j) <= ord("9"):
      continue
    else:
      print("No")
      exit()
print("Yes")

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


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

Solution (Python):
a=input().split();s=input()
if s.count('-')<1 or s.count('-')>1:
    print('No')
elif s[int(a[0])]!='-':
    print('No')
else:
    print('Yes')

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

if len(S) == A + B + 1 and S[A] == '-':
    count = 0
    for i in range(A+B+1):
        if S[i] == '-':
            count += 1
    if count == 1:
        print("Yes")
    else:
        print("No")
else:
    print("No")

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

Solution (Python):
import re

int_a, int_b = map(int, input().split())
int_s = input()

pattern = '\d{' + str(int_a) + '}-\d{' + str(int_b) + '}$'

r = re.compile(pattern)

if r.match(int_s):
    print("Yes")
else:
    print("No")

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

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

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

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

S = raw_input()

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

mozi = 'Yes'
if S[A] == '-':
    for i in range(A+B+1):
        if i == A:
            continue
        if S[i] not in data:
            mozi = 'No'
else:
    mozi = 'No'

print mozi

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

Solution (Python):
A,B = map(int,input().split())
S = str(input())
if len(S) > A+B+1:
        print("No1")
        exit()
if len(S[A+1:]) != B:
        print("No2")
        exit()
if S == S[0:A]+"-"+S[A+1:] and "-" not in S[0:A] and "-" not in S[A+1:] :
        print("Yes")
else:
        print("No")

Solution (Python):


import copy
import numpy as np
import random

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

s = s.split("-")
if len(s[0]) == a and len(s[1]) == b:
    try:
        int(s[0]) and int(s[1])
        print("Yes")
    except:
        print("No")
        
else:
    print("No")

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

if len(s) != a+b+1:
  print("No")
else:
  if s[a] == "-" and "-" not in s[0:a] and  "-" not in s[a+1:a+b+1]:
    print("Yes")
  else:
    print("No")

Solution (Python):

def getIntList(): return [int(x) for x in input().split()]
def db(x): 
    global debug
    if debug: print(x)
debug = False
A,B = getIntList()
S = input()
db((A,B,S))
number = [chr(ord('0')+i) for i in range(10)]
db(number)
if S[A]=='-':
    for i in range(A):
        if not(S[i] in number):
            print('No');break
    else:
        for i in range(A+2,A+B+1):
            if not(S[i] in number):
                print('No');break
        else:
            print('Yes')  
else: 
    print('No')

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


if __name__ == '__main__':
    main()

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

for i,x in enumerate(s):
  if i<a and x.isdigit():
    pass
  elif i==a and x=='-':
    pass
  elif a<i and x.isdigit():
    pass
  else:
    print("No")
    sys.exit()

print("Yes")

Solution (Python):
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):
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'
if S[a] == '-':
    S = S.replace('-', '', 1)
    for i in S:
        if not i in '1234567890':
            ans = 'No'
else:
    ans = 'No'
    
print(ans)

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

Solution (Python):
A, B = map(int,input().split())
S = list(input())
ans = True
if len(S) != (A+B+1):
    ans = False
elif S.count("-") != 1:
    ans = False
elif S.index("-") != A:
    ans = False
elif S != [i for i in S if i.isdecimal() or i == "-"]:
    ans = False
if ans:
    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 = list(input())
for i in range(len(s)):
    if i == a:
        if s[i] != '-':
            print('No')
            exit()
    else:
        if not s[i].isdigit():
            print('No')
            exit()
else:
    print('Yes')

Solution (Python):
from collections import Counter

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

A, B = inpl()
for i, s in enumerate(list(input())):
    if i < A:
        try:
            int(s)
        except:
            print("No")
            exit()
    elif i == A:
        if s == "-":
            pass
        else:
            print("No")
            exit()
    else:
        try:
            int(s)
        except:
            print("No")
            exit()
print("Yes")

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

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 = list(input())
flag = 0
if S[A] == "-":
    pass
else:
    flag = 1
    print("No")
high = S.pop(A)
s = "".join(S)
if flag == 0:
    if s.isdecimal():
        print("Yes")
    else:
        print("No")

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

Solution (Python):
import sys
A,B = [int(n) for n in input().split()]

S = str(input())
if(S[A] != "-"):
    print("No")
    sys.exit()
S = S[:A] + S[A+1:]
table = [str(n) for n in range(10)]
for s in S:
    if not( s in table):
        print("No")
        sys.exit()
print("Yes")

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

for i in range(a+b+1):
    if 0<= i <a or a+1<= i <=a+b:
        if not s[i] in list(map(str,[j for j in range(10)])):
            print('No')
            break
    if i == a:
        if  s[i] != '-':
            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[a+1:a+b+1].isdecimal() and len(s[a+1:])==b:
  print('Yes')
else:
  print('No')

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

if "-" in c:
	d=0
	e=0
	for i in range(len(c)):
		if c[i] != "-":
			d=d+1
		else:
			break
	for i in range(len(c)):
		if c[-i-1] != "-":
			e=e+1
		else:
			break
	if d==a and e==b:
		print("Yes")
	else:
		print("No")
else:
	print("No")

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

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

Solution (Python):
a, b = map(int, input().split())
code = input()
first = code[:a]
second = code[-b:]
if (('-' not in first) & ('-' not in second) & ('-' in code[a])):
  print('Yes')
else:
  print('No')

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

Solution (Python):
A, B = map(int, input().split())
S = str(input())
if S[: A].isnumeric() and S[A] == '-' and S[A + 1:].isnumeric():
    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()
fd=s.find('-')
t=str.maketrans({
	'-':'',
})


T=s.translate(t)
c=len(T)
d=len(s)
if fd+1==a+1:
	if c==d-1:
		print('Yes')
	else:
		print('No')
else:
	print('No')

Solution (Python):
a,b=map(int,input().split())
s=list(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] == '-'):
  if(S[:A].isdigit() and S[A+1:A+B+1].isdigit()):
    print('Yes')
  else:
    print('No')
else:
  print('No')

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

Solution (Python):
a, b = map(int, input().split())
s = input()
for i, c in enumerate(s):
    if i != a and not c.isdecimal() or i == a and c != '-':
        print("No")
        exit()
print("Yes")

Solution (Python):



def main():
    from re import compile

    a, b = map(str, input().split())
    s = input()
    pattern = '[0-9]{' + a + '}-{1}[0-9]{' + b + '}'
    re_pattern = compile(pattern)
    result = re_pattern.match(s)

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


if __name__ == '__main__':
    main()

Solution (Python):
A,B=map(int, input().split())
S=input()
if S[A]=="-":
    st=S.split("-")
    n=st[0];m=st[1]
    if n.isdigit() and m.isdigit():
        print("Yes")
    else:
        print("No")
else:
    print("No")

Solution (Python):

A,B=list(map(int,input().split()))
S=input()
flag=True
if len(S)!=A+B+1:
    flag=False
for i in range(len(S)):
    if i<A or i>A:
        if S[i]!="0" and S[i]!="1" and S[i]!="2" and S[i]!="3" and S[i]!="4" and S[i]!="5" and S[i]!="6" and S[i]!="7" and S[i]!="8" and S[i]!="9":
            flag=False
    else:
        if S[i]!="-":
            flag=False
if flag:
    print("Yes")
else:
    print("No")

Solution (Python):
import re

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

p = "[0-9]{%d}-[0-9]{%d}" % (a, b)

m = re.match(p, s)
if m:
    print('Yes')
else:
    print('No')

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



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

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

Solution (Python):

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

Solution (Python):
from sys import stdin
a = [int(i) for i in input().split()] 
s = stdin.readline().rstrip()
if s.find('-') != a[0]:
 ans = 'No'
else:
  if s.rfind('-') != a[0]:
   ans = 'No'
  else:
   ans = 'Yes'
print(ans)

Solution (Python):
A, B = 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 re
A, B = map(int, input().split())
S = input()

if S[A] != "-":
    print("No")
else:
    if "-" in S[0:A] or "-" in S[A+1:]:
        print("No")
    else:
        print("Yes")

Solution (Python):

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

pattern = r"\d{{{}}}-\d{{{}}}".format(A, B)
mo = re.search(pattern, S)

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

Solution (Python):

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

p_regex = re.compile("\d"*A + "-" + "\d"*B)
mo = p_regex.search(S)

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

Solution (Python):


def main():
    sa = input().split(' ')
    S = input()
    A = int(sa[0])
    B = int(sa[1])

    correct = True
    if len(S) != A + B + 1:
        correct = False
    else:
        for i in range(A + B + 1):
            if i == A:
                if S[i] != '-':
                    correct = False
                    break
            else:
                if S[i] < '0' or '9' < S[i]:
                    correct = False
                    break

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


if __name__ == '__main__':
    main()

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

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

for i, s in enumerate(S):
    if i == A:
        if s.isdigit():
            print("No")
            exit()
    else:
        if not s.isdigit():
            print("No")
            exit()
print("Yes")

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

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


abc084_b()

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


flag=0

if s.count('-') == 1:
  s1, s2=[i for i in s.split('-')]
  if len(s1) == a and len(s2) == b :
    flag = 1

print('Yes' if flag==1 else 'No')

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


flag=1

if s.count('-') < 1 or  s.count('-') > 1:
  flag=0
else:
  s1, s2=[i for i in s.split('-')]

  if len(s1) < a or a < len(s1) or len(s2) < b or b < len(s2):
    flag=0

print('Yes' if flag==1 else 'No')

Solution (Python):

a , b = map(int,input().split())
c = input()
d = len(c)
e = 0
for i in range(d):
    if c[i] =="-" and i != a:
        e = e + 1
if a+b+1 == d and c[a] =="-" and e == 0:
    
    print("Yes")
else:
    print("No")

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

Solution (Python):



def main():
    """Function."""
    a, b = map(int, input().split())
    s = str(input())

    check = set()
    for dum in ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]:
        check.add(dum)

    s = list(s)
    flag = 1
    for i in range(len(s)):
        if i == a:
            if s[i] != "-":
                flag = -1
                break

        else:
            if s[i] not in check:
                flag = -1
                break

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


if __name__ == "__main__":
    main()

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


if __name__ == '__main__':
    main()

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


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

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

Solution (Python):
a, b = map(int, input().split())
str = input()
s = str.replace('-', '')
if len(s) == a+b and s.isdecimal() and str.rfind('-') == a:
    print('Yes')
else:
    print('No')

Solution (Python):
A, B = map(int, input().split())
S = input()
NUM = [str(i) for i in range(10)]

for i in range(A):
    if S[i] not in NUM:
        print("No")
        quit()

if S[A] != "-":
    print("No")
    quit()

for i in range(A + 1, A+B+1):
    if S[i] not in NUM:
        print("No")
        quit()
print("Yes")

Solution (Python):
A,B = [int(i) for i in input().split()]
S = input()

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

Solution (Python):
num = list("1234567890")
a,b = map(int, input().split())
s = input()
if s[a] != "-":
    print("No")
    quit()
s_a,s_b = list(s[:a]),list(s[a+1:])
for i in s_a:
    if i not in num:
        print("No")
        quit()
for i in s_b:
    if i not in num:
        print("No")
        quit()
print("Yes")

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

if(S[A]=='-'):
    S.pop(A)
else:
    flag=1

if('-' in S):
    flag=1

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

Solution (Python):
a,b=map(int,input().split())
s=input()
flag=s.rfind("-")==s.find("-")

if flag:
    if a==s.find("-"):
        print("Yes")
    else:
        print("No")
else:
    print("No")

Solution (Python):

a, b = map(int, input().split())
s = input()
for i, char in enumerate(s):
    if i == a:
        if char != '-':
            exit(print('No'))
    else:
        if '0' <= char <= '9':
            pass
        else:
            exit(print('No'))
print('Yes')

Solution (Python):
A,B=map(int,input().split())
S=list(input())
flag=0
if S[A]!='-':
    flag=1
S.pop(A)
if '-' in S:
    flag=1
if flag==0:
    print('Yes')
else:
    print('No')

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

Solution (Python):
a,b = map(int,input().split(" "))
c = input()
if c.count("-") == 1:
    ar = c.split("-")
    if len(ar[0]) == a and len(ar[1]) == b:
        print("Yes")
    else:
        print("No")
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):
import re
A, B = [int(_) for _ in input().split()]
if re.match('^\d{%s}-\d{%s}$' % (A, B), input()):
    print('Yes')
else:
    print('No')

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

number = ['1','2','3','4','5','6','7','8','9','0']
hyphen = '-'

for i in range(len(s)):
    if i < a:
        if not s[i:i+1] in number:
            print('No')
            break
    elif i == a:
        if s[i:i+1] != hyphen:
            print('No')
            break
    else:
        if not s[i:i+1] in number:
            print('No')
            break
else:
    print('Yes')