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):
N_before, N_after = map(int, input().split())
S = input()
judge = 'Yes'

if (S[: N_before].count('-') >= 1):
    judge = 'No'

if (S[N_before] != '-'):
    judge = 'No'

if (S[N_before + 1 :].count('-') >= 1):
    judge = 'No'

print(judge)

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

if S[a]=='-':
    if not '-' in S[:a] and not '-' in S[a+1:]:
        ans=True
        
print("Yes" if ans else "No")

Solution (Python):
a, b = map(int, input().split())
s = list(input().split("-"))
if len(s)!=2:
    print("No")
else:
    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()
if s[a:a + 1] == '-' and s[:a].isdecimal() and s[a+1:].isdecimal():
    print('Yes')
else:
    print('No')

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

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

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

ans = "No"
if (len(a_list) == 2) and (b_list.count("-") == 1) and (len(a_list[0]) == a) and (len(a_list[1]) == b):
  ans = "Yes"
  
print(ans)

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

flag = True
l= '0123456789'
for s in S[:A]+S[A+1:]:
  if s not in l:
    flag = False
print(['No','Yes'][S[A] == '-' and flag])

Solution (Python):

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


s = list(input())
if s[a] != "-":
    print("No")
    exit()

s.pop(a)
try:
    a = list(map(int,s))
    
except:
    print("No")
    exit()
print("Yes")

Solution (Python):
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
mod=10**9+7

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

f=1
for i in range(A+B+1):
    if i==A:
        if S[i]!="-":
            f=0
    else:
        if S[i]=="-":
            f=0
            
if f==1:
    print("Yes")
else:
    print("No")

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

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

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

import re

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

l=set(['1','2','3','4','5','6','7','8','9','0'])

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

del S[A]
for s in S:
    if s not in l:
        print('No')
        exit()
print('Yes')

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

s=input()

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

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 :
            continue
        if "0" > S[i] or "9" < S[i] :
            print("No")
            exit()
    print("Yes")
else :
    print("No")

Solution (Python):
a, b = map(int, input().split())
s = input()
ans = "No"
num = [i for i in range(10)]

if len(s) == a+b+1:
    if s[a] == "-":
        s = list(s)
        s.pop(a)
        s = "".join(s)
        if s.isdigit():
            ans = "Yes"
print(ans)

Solution (Python):
a,b = map(int,input().split())
s=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("-")==1:
    print("Yes")
else:
    print("No")

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

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

ans = ""
ss = ""
for i in range(len(s)):
    if i == a:
        ss += " "
    else:
        ss += s[i]    

if (len(s) != a+b+1) or (s[a] != "-") or ("-" in ss):
    ans = "No"
else:
    ans = "Yes"

print(ans)

Solution (Python):
A, B = [int(i) for i in input().split()]
S = input()
for i in range(A+B+1):
    if i==A:
        if S[i]=='-':
            continue
        else:
            print("No")
            quit()
    else:
        try:
            int(S[i])
        except:
            print("No")
            quit()
print("Yes")

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

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

A = []
s = input()
A = s.split("-")


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

Solution (Python):
a, b = map(int, input().split())
s = input()
ans = "Yes"
for i, s_i in enumerate(s):
    if i == a:
        if s_i == "-":
            pass
        else:
            ans = "No"
            break
    else:
        if s_i != "-":
            pass
        else:
            ans = "No"
            break
print(ans)

Solution (Python):
def main():
    A, B = map(int, input().split())
    postcode = input()
    answer = False
    if postcode.count("-") == 1:
        if postcode[A] == "-" and postcode[:A].isdecimal() and postcode[A + 1:].isdecimal():
            answer = True
    print("Yes" if answer else "No")


if __name__ == '__main__':
    main()

Solution (Python):
a,b = map(int,input().split())
s = list(input())
ans = "Yes"
if len(s) != a + b + 1:
    ans = "No"
if s[a] != "-":
    ans = "No"
for i in range(a - 1):
    if s[i] == "-":
        ans = "No"
for i in range(a + 1,a + b + 1):
    if s[i] == "-":
        ans = "No"
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):
a,b=map(int,input().split())
s=input()

tmp1=s[:a]
tmp2=s[a]
tmp3=s[a+1:]

if all([tmp1[i]!='-' for i in range(len(tmp1))])==True and tmp2=='-' and all([tmp3[i]!='-' for i in range(len(tmp3))])==True:
  print('Yes')
else:
  print('No')

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

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

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

print(ans)

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

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

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

Solution (Python):
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 = True
if len(s) == a + b + 1:
    for i in range(len(s)):
        if i == a:
            if not (s[i] == '-'):
                check = False
        else:
            if not (s[i] in '0123456789'):
                check = False
else:
    check = False
if check:
    print("Yes")
else:
    print("No")

Solution (Python):

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

flag = True
for i in range(a):
    if s[i] == '-':
        flag = False
if s[a] != '-':
    flag = False
for i in range(a + 1, a + b + 1):
    if s[i] == '-':
        flag = False

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

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

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

Solution (Python):

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

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

if flag:
    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):




def main():
    A, B = map(int, input().split())
    S = input()
    N = S[:A] + S[A + 1:]

    print("Yes" if S[A] == "-" and N.isdigit() else "No")


if __name__ == "__main__":
    main()

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

if S[0:A].count('-') > 0 or S[A+1:A+B].count('-') > 0 or S[A]!='-':
    print('No')
else:
    print('Yes')

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

for i, s in enumerate(S):
    if i == A:
        if s != '-':
            ans = 'No'
    if i != A:
        if s == '-':
            ans = 'No'

print(ans)

Solution (Python):
A,B=map(int,input().split())
S=input()
l=S.split("-")
if (len(l[0])==A)and(len(l[1])==B):
    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,_ = map(int,input().split())
s = input()
print('YNeos'[1-all([s[:a].isdigit(),s[a]=='-',s[a+1:].isdigit()])::2])

Solution (Python):
a, b = map(int, input().split())
s = input()
l = len(s)
ok = 1

for i in range(a):
    if s[i] == '-':
        ok = 0
if s[a] != '-':
    ok = 0
for i in range(a+1, l):
    if s[i] == '-':
        ok = 0
if ok == 1:
    print("Yes")
else:
    print("No")

Solution (Python):
def is_number(num):
    try:
        int(num)
        return True
    except:
        return False

A, B = map(int, input().split())
S = input()
for i in range(A):
    if not is_number(S[i]):
        print("No")
        exit()
if S[A] != "-":
    print("No")
    exit()
for i in range(A + 1, A + B):
    if not is_number(S[i]):
        print("No")
        exit()
print("Yes")

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

Solution (Python):
a, b = map(int, input().split())
s = input()
if s[a] != "-":
  print("No")
else:
  s1, s2 = s[:a], s[a+1:]
  if s1.isdigit() and s2.isdigit():
    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()

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

Solution (Python):
A,B=map(int,input().split())
S=str(input())
T=sorted(S[:])

p=0
if (A+B+1)!=len(S):
  print("No")
else:
  if S[A]=="-":
    for i in range(1,len(S)):
      if 48<=ord(T[i])<=57:
        
        p=1
      else:
        p=0
        break
    
    print("Yes" if p!=0 else "No")
  else:
    print("No")

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

flag=True
count=0

for i in range(len(s)):
    if s[i]=='-':
        count+=1
        if i!=a:
            flag=False
            break

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

Solution (Python):
import re

A,B = map(int, input().split())
S = str(input())
ma = '^[0-9]{'+str(A)+'}-[0-9]{'+str(B)+'}$'
pattern = re.compile(ma)
m=pattern.match(S)

if m is not None:
    print('Yes')
else:
    print('No')

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

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

flag = False
if(s[a] == '-'):
    flag = True

for i in range(a + b + 1):
    if(i != a and flag):
        if(not s[i].isdecimal()):
            flag = False

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

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

Solution (Python):
a,b=map(int,input().split())
s=str(input())
f= s[a]=="-" and len(s)==a+b+1 and s.count("-")==1
print("Yes" if f is True else "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
    else:
        if S[i] == "-":
            flag = False
            break
        a = int(S[i])
        if not (0<=a):
            flag = False
            break
        if not (a<=9):
            flag = False
            break

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

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

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


flag=True
if len(s)!=a+b+1:
  flag=False
  
for i in range(len(s)):
  if i==a:
    if s[i]!='-':
      flag=False
  else:
    if s[i]=='-':
      flag=False
if flag:
  print('Yes')
else:
  print('No')

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

arr = list(range(10))
arr = list(map(str,arr))

x = s.pop(a)

flag = True
for i in range(len(s)):
    if s[i] in arr:
        pass
    else:
        flag = False

if x == '-' and flag == True:
    print('Yes')
else:
    print('No')

Solution (Python):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a,b=INTM()
    s=STR()
    count='1234567890'
    flg=1
    for i in range(len(s)):
        if i!=a:
            if s[i] in count:
                pass
            else:
                flg=0
        else:
            if s[i]=='-':
                pass
            else:
                flg=0
    if flg==1:
        print('Yes')
    else:
        print('No')
        
if __name__ == '__main__':
    do()

Solution (Python):
AB = input()  
S = input()  

A, B = AB.split()  
A = int(A)  
B = int(B)  





def is_zip_ok(A, B, S):
  for i in range(0, A):
    if not S[i].isdecimal():
      return False

  if S[A] != '-':
    return False

  for i in range(A + 1, A + B + 1):
    if not S[i].isdecimal():
      return False

  return True

if is_zip_ok(A, B, S):
  print("Yes")
else:
  print("No")

Solution (Python):
ab = input()  
s = input()  

a, b = ab.split()  
a = int(a)
b = int(b)

def is_zip_correct(a, b, s):
    if len(s) != a + b + 1:
        
        return False

    
    for i in range(0, a):
        if not s[i].isdecimal():
            
            return False

    
    if s[a] != '-':
        
        return False

    
    for i in range(a + 1, a + b + 1):
        if not s[i].isdecimal():
            
            return False

    return True

if is_zip_correct(a, b, s):
    print("Yes")
else:
    print("No")

Solution (Python):
a,b=map(int,input().split())
try:
	s=input()
	sa=int(s[:a])
	ss=s[a]
	sb=int(s[a+1:])
	print("Yes" if ss=='-' else "No")
except:
	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()

l=S.split("-")


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

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

Solution (Python):
"""
author : halo2halo
date : 24, Jan, 2020
"""

import sys




read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

A, B = map(int, readline().split())
S = readline().decode('utf8').rstrip()
T=S[:A]+S[A+1:]
bl = S[A] == '-' and T.find('-')==-1
print('Yes' if bl else 'No')

Solution (Python):
"""
author : halo2halo
date : 24, Jan, 2020
"""

import sys




read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

A, B = map(int, readline().split())
S = readline().decode('utf8').rstrip()
T=S[:A]+S[A+1:]
bl = S[A] == '-' and not('-' in T)

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

Solution (Python):
"""
author : halo2halo
date : 24, Jan, 2020
"""

import sys




read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

A, B = map(int, readline().split())
S = readline().decode('utf8').rstrip()

print('Yes' if S[A] == '-' and (S[:A] + S[A + 1:]).isdigit() 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):
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()

for i in range(A):
  if not '0' <= S[i] <= '9':
    print("No")
    exit()
if S[A] != '-':
  print("No")
  exit()
for i in range(A+1, A+B+1):
  if not '0' <= S[i] <= '9':
    print("No")
    exit()
print("Yes")

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

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

if S[A] != '-':
  ans = "No"
elif parta.isdecimal() and partb.isdecimal():
  ans = "Yes"
else:
  ans = "No"
print(ans)

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

Solution (Python):

a,b = map(int,input().split())
s = input()
flag = 0
for i in range(a+b+1):
    if i < a or i > a :
        if s[i] == "-": flag = 1
        """if ord(s[i]) < 48 or ord(s[i]) > 57:
            flag = 1"""
    elif s[i] != "-":
        flag = 1
print("Yes" if flag == 0 else "No")

Solution (Python):

a,b = map(int,input().split())
s = input()
flag = 0
for i in range(a+b+1):
    if i < a or i > a :
        if ord(s[i]) < 48 or ord(s[i]) > 57:
            flag = 1
    elif s[i] != "-":
        flag = 1
print("Yes" if flag == 0 else "No")

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

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

Solution (Python):

n,m = map(int,input().split())
s = input()
flag = 0
for i in s:
    if i == "-":
        flag += 1


if len(s)==n+m+1 and flag == 1 and s[n] == "-":
    print("Yes")
else:
    print("No")

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

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

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

if re.fullmatch("\d{%s}-\d{%s}" % (a, b), s):
    print("Yes")
else:
    print("No")

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

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

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

if len(s)!=a+b+1:
  print("No")
  exit()

for i in range(len(s)):
  if i<a:
    if s[i] not in ["0","1","2","3","4","5","6","7","8","9"]:
      print("No")
      exit()
  elif i==a:
    if s[i] != "-":
      print("No")
      exit()
  elif i<a+b+1:    
    if s[i] not in ["0","1","2","3","4","5","6","7","8","9"]:
      print("No")
      exit()
print("Yes")
exit()

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 not '0' <= s[i] <= '9':
      print('No')
      exit()
  
print('Yes')

Solution (Python):
a, b = map(int, input().split())
s = input()
x = s[:a]
y = s[a+1:]


if x.isnumeric() and y.isnumeric() and len(y) == b and s[a] == "-":
    print("Yes")
else:
    print("No")

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

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

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

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

Solution (Python):

from itertools import product, permutations, combinations
from bisect import bisect_right,bisect_left

A,B=map(int, input().split())
S=input()
res = S.split('-')
if len(res) != 2:
    print('No')
else:
    if len(res[0]) == A and len(res[1]) == B:
        print('Yes')
    else:
        print('No')

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

Solution (Python):
A, B = map(int, input().split())
S = input()
print("YNeos"[not(len(S)==A+B+1 and S[A]=="-" and all(s.isdigit() for i,s in enumerate(S) if i != A))::2])

Solution (Python):
a, b = map(int,input().split())
s = input()
if len(s) == a+b+1 and s.count('-') == 1:
  pass
else:
  print("No")
  exit(0)

s1,s2 = s.split('-')
if a == len(s1) and b == len(s2):
  print("Yes")
else:
  print("No")

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

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

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

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

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

    if ''.join(slist).isdigit():
        print('Yes')
        exit()

    print('No')

if __name__ == '__main__':
    main()

Solution (Python):


a,b=map(int,input().split())
S=[i for i in input()]
l=[]


cnt=0
if S[a]=='-':
    del S[a]
    for u in S:
        if u=='-':
            print('No')
            break
        else:
            cnt+=1
            if cnt==len(S):
                print('Yes')
else:
    print('No')

Solution (Python):
A, B = map(int, input().split())
S = input().split('-')
if len(S) > 1:
    former, latter = S[0], S[1]
else:
    former = latter = []

if len(former) == A and len(latter) == B:
    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())

c = s.pop(a)
if (c != '-'):
   print('No')
   exit()

try:
   check = [int(x) for x in s]
except:
   print('No')
   exit()
print('Yes')

Solution (Python):
a, b = map(int, input().split())
s = input()
for i in s:
    s0 = s[0:a]
    s1 = s[a+1:]

if s0.isdigit() and s1.isdigit() and s[a] == '-':
    print('Yes')
else:
    print('No')

Solution (Python):
A,B = [int(i) for i in input().split()]
S = input()
Sa = S[:A]
Sb = S[A+1:]
def hoge(S) :
    if S[A] == "-" :
        return True
    else :
        return False
if Sa.isdecimal() and hoge(S) and Sb.isdecimal() :
    print("Yes")
else :
    print("No")

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

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

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


if s[a] == "-":
  s = list(s)
  s.sort()
  if s[1] == "-":
    print("No")
  else:
    print("Yes")
else:
  print("No")

Solution (Python):
import re

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

reg = "\d{{{}}}-\d{{{}}}".format(A, B)
m = re.fullmatch(reg, S)
if m:
    print("Yes")
else:
    print("No")

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

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

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

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

print('Yes')

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

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

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

Solution (Python):
def main():
  a, b = map(int, input().split())
  s = input()
  for i in range(len(s)):
    if i == a:
      if s[i] != '-':
       	return False
    else:
      if s[i] == '-':
        return False
  return True
 
if __name__ == '__main__':
  if main():
    print('Yes')
  else:
    print('No')

Solution (Python):
import sys
input = sys.stdin.readline
a,b=map(int,input().split())
s=input().strip()
flg=True
for i in range(a):
    if s[i]=="-":
        flg=False
if s[a]!="-":
    flg=False
for i in range(b):
    if s[a+i+1]=="-":
        flg=False
print("Yes" if flg else "No")

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

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

Solution (Python):
import sys
input = sys.stdin.readline
A, B = [int(x) for x in input().split()]
S = input().rstrip()
if S[A] != "-":
    print("No")
    sys.exit()
if "-" in S[:A] or "-" in S[A+1:]:
    print("No")
    sys.exit()
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())
S = input()

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

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

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

Solution (Python):
def main(a: int, b: int, s: str):
    try:
        _a, _b = s.split('-')

        if a != len(_a) and b != len(_b):
            print('No')
        else:
            print('Yes')
    except ValueError:
        print('No')


if __name__ == "__main__":
    a, b = map(int, input().split())
    s = input()

    main(a, b, s)

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 s[i] != '-':
            flag = False

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

Solution (Python):


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

isNo = False
if s[a] != "-":
    isNo = True
else:
    try:
        int(s[:a])
    except:
        isNo = True

    try:
        int(s[a+1:])
    except:
        isNo = True

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

Solution (Python):

 
import math
import itertools
import sys
import copy
 




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

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




try:
  d1 = int(S[0:A])
  d2 = int(S[A+1:])
except:
  print ("No")
  exit()

if d1 < 0 or d2 < 0 :
  print ("No")
  exit()
    
print ("Yes")

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

Solution (Python):
import re
A,B=map(int,input().split())
S=input()
a,b,flg=S[0:A],S[-B:],True
if S[A]!="-" or re.match(".*[^0-9].*",a) or re.match(".*[^0-9].*",b):flg=False
print("Yes" if flg else "No")

Solution (Python):

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

if s[a] == "-":
    s.pop(a)
    if s.count("-") == 0:
        print("Yes")
    else:
        print("No")

else:
    print("No")

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

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

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

if s.count('-')==1 and s[a]=='-':
    for i in range(a):
        if int(s[i]) in range(0, 10):
            cnt += 1
    if s[a]=='-':
        cnt += 1
    for i in range(b):
        if int(s[a+1+i]) in range(0, 10):
            cnt += 1

    if cnt == a+b+1:
        print('Yes')
    else:
        print('No')

else:
    print('No')

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

ans = "Yes" if s.count("-") == 1 and s.find("-") == a else "No"
print(ans)