Problem:
 Score : 200 points    Problem Statement The postal code in Atcoder Kingdom is A+B+1 characters long, its (A+1) -th character is a hyphen - , and the other characters are digits from 0 through 9 .  You are given a string S . Determine whether it follows the postal code format in Atcoder Kingdom.      Constraints  1≤A,B≤5  |S|=A+B+1  S consists of - and digits from 0 through 9 .         Input Input is given from Standard Input in the following format:  A  B  S       Output Print Yes if S follows the postal code format in AtCoder Kingdom; print No otherwise.        Sample Input 1 3 4
269-6650      Sample Output 1 Yes  The (A+1) -th character of S is - , and the other characters are digits from 0 through 9 , so it follows the format.       Sample Input 2 1 1
---      Sample Output 2 No  S contains unnecessary - s other than the (A+1) -th character, so it does not follow the format.       Sample Input 3 1 2
7444      Sample Output 3 No

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

Solution (Python):






import sys
input = sys.stdin.readline

import math

import bisect
from collections import defaultdict
from collections import deque
from functools import lru_cache






MOD = 10**9+7
INF = float('inf')






def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]


def Yes(): print("Yes"); return
def No(): print("No"); return


def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0: 
        cnt+=1 
        temp //= i
      arr.append([i, cnt])
  if temp!=1:
    arr.append([temp, 1])
  if arr==[]:
    arr.append([n, 1])
  return arr


def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors


def lcm(a, b):
    return a * b // gcd (a, b)


def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count


def Base_10_to_n(X, n):
  if X//n:
    return Base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def Base_n_to_10(X, n):
  return sum(int(str(X)[-i])*n**i for i in range(len(str(X))))


def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count





A,B = inputIL()
S = inputS()

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

if len(S) != A+B+1:
  No()
  exit()
for i in range(A):
  if S[i] not in num:
    No()
    exit()
if S[A] != "-":
    No()
    exit()
for i in range(A+1,A+B+1):
  if S[i] not in num:
    No()
    exit()  
Yes()

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

Solution (Python):
A, B = map(int, input().split())
S = list(map(str, 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()
num=["0","1","2","3","4","5","6","7","8","9"]
left=s[:a]
right=s[a+1:]
if s[a] != '-':
    print('No')
    exit()
for i in left:
    if i in num:
        continue
    else:
        print('No')
        exit()
for j in right:
    if j in num:
        continue
    else:
        print('No')
        exit()
print('Yes')

Solution (Python):
import sys
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())

A, B = mi()
S = input()
number = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']

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

for i in range(A+B+1):
    if i != A and S[i] not in number:
        print('No')
        exit()

print('Yes')

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

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

Solution (Python):

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

if s[a]!="-":
    print("No")
    
elif s.count("-")>1:
    print("No")
    
else:
    s=s.replace("-","")
    
    
    if s.isdigit()==True:
        print("Yes")
    else:
        print("No")

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

Solution (Python):
import re,sys
def S(): return sys.stdin.readline().rstrip()
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
A,B = LI()
S = S()
p = '[0-9]{{{0}}}-[0-9]{{{1}}}'.format(A,B)
print('Yes' if re.fullmatch(p,S) else 'No')

Solution (Python):
import re,sys
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
A,B = LI()
S = S()
pattern_str = r'\d{{{}}}-\d{{{}}}'.format(A,B)
print('Yes' if re.fullmatch(pattern_str,S) else 'No')

Solution (Python):
import re,sys
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
A,B = LI()
S = S()
print('Yes' if re.fullmatch(pattern=r'\d{'+str(A)+'}-\d{'+str(B)+'}',string=S) else 'No')

Solution (Python):
import sys
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
A,B = LI()
S = S()
ans = 1
for i in range(A+B+1):
    if i==A:
        if S[i]!='-':
            ans = 0
            break
    else:
        if not S[i] in '1234567890':
            ans = 0
            break
print(['No','Yes'][ans])

Solution (Python):
import re,sys
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
A,B = LI()
S = S()
print('Yes' if re.fullmatch(pattern=r'\d{{{}}}-\d{{{}}}'.format(A,B),string=S) else '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):
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())
ans = "No"

if S.pop(A)=="-":
    for i in S:
        if i not in str([0,1,2,3,4,5,6,7,8,9]):
            break
    else:
        ans = "Yes"

print(ans)

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

flag = True
if len(s) != 2:
    flag = False
if flag:
    if len(s[0]) != a:
        flag = False
    if len(s[1]) != b:
        flag = False
if flag:
    print("Yes")
else:
    print("No")

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

Solution (Python):
A, B = map(int, input().split())
S = list(input())
flag = 1
a = "".join(S[:A])
b = "".join(S[A+1:])
if not(str.isdecimal(a)):
  flag = 0
if S[A] != "-":
  flag = 0
if not(str.isdecimal(b)):
  flag = 0
if flag == 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:].isdigit():
    print("Yes")
else:
    print("No")

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

Solution (Python):
import collections


def inputStrOnebyOne():
    s = list(input())
    return s


def inputOnebyOne_Int():
    a = list(int(x) for x in input().split())
    return a

def main():
    a,b = input().split()
    s = input()
    if s.count("-") == 1:
        c,d = s.split("-")
        if a == str(len(c)) and b == str(len(d)):
            print("Yes")
        else:
            print("No")
    else:
        print("No")

if __name__=='__main__':
    main()

Solution (Python):
A,B=map(int,input().split())
S=input()
L=list(S)
l=L.count('-')
if l==1:
  SS,T=S.split('-')
  if len(str(SS))==A and len(str(T))==B:
    print('Yes')
  else:
    print('No')
    
else:
  print('No')

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

c = 0

for i in s:
    if i == '-':
        c += 1

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

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

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

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

index = n.find("-")

if n.count("-") == 1 and index == a:
	print("Yes")
else:
	print("No")

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

Solution (Python):
a, b = map(int, input().split())
s = input()
f = False
if s[a] == '-':
    f = True

for i in range(len(s)):
    if s[i] == '-' and i != a:
        f = False

if f:
    print('Yes')

else:
    print('No')

Solution (Python):
import math
def py():
    print("Yes")
def pn():
    print("No")
def iin():
    x = int(input())
    return x

neko = 0
nya = 0
nuko = 0

a,b = map(int,input().split())
s = input()
for x in range(len(s)):
    if s[x] == '-':
        neko = x
        nya+=1
if nya != 1:
    pn()
elif (a == neko)and(b == len(s)-1-neko):
    py()
else:
    pn()

Solution (Python):

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

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

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

print("Yes") if (S.find("-")==A) & (S.count("-")==1) else print("No")

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

for i, c in enumerate(S):
    if not ((i == A and c == '-') or (i != A and c in '0123456789')):
        flg = False

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

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

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

Solution (Python):
import sys

input = sys.stdin.readline

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

if __name__ == '__main__':
    main()

Solution (Python):
import sys

input = sys.stdin.readline

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

if __name__ == '__main__':
    main()

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

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

ans = True
for i in range(len(S)):
    if i == A:
        if S[i] != "-":
            ans = False
    else:
        if not (48 <= ord(S[i]) <= 57):
            ans = False

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

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

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

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

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

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

Solution (Python):
A, B = map(int, input().split())
S = input()
num = '1234567890'
for i in S[:A]:
    if i in num:
        continue
    else:
        print('No')
        exit()
if S[A] != '-':
    print('No')
    exit()
for i in S[A+1:]:
    if i in num:
        continue
    else:
        print('No')
        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() and len(S) == A+B+1:
    print('Yes')
else:
    print('No')

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

Solution (Python):


import sys
input= lambda: sys.stdin.readline().rstrip()
sys.setrecursionlimit(10**9)
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))
def lispin(t=int):return list(pin(t))

from fractions import gcd
def resolve():
    A,B=pin()
    S=input()
    for i in range(A+B+1):
        if i==A:
            if S[i]!="-":
                print("No")
                return
        else:
            if S[i]=="-":
                print("No")
                return
    print("Yes")
        

resolve()

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

    p = '[0-9]{' + str(a) + '}-[0-9]'
    if re.match(p, s):
        print('Yes')
    else:
        print('No')


resolve()

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 = 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 = list(map(int,input().split()))
C = input()
for i in range(A):
    if C[i] !="-":
        pass
    else:
        print("No")
        exit()
if C[A] == "-":
    pass
else:
    print("No")
    exit()
for i in range(A+1,A+B+1):
    if C[i] !="-":
        pass
    else:
        print("No")
        exit()
print("Yes")

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

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

S1 = S[:A]
S2 = S[A]
S3 = S[A+1:]

print("Yes" if S1.isdecimal() and S2 =="-" and S3.isdecimal() else "No")

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

flg = True
skip = A
cnt=0

if len(S) != A+B+1:
    flg=False
    

for i in range(len(S)):
    
    if cnt == A:
        if S[cnt]!= "-":
            flg = False
    else:
        if S[cnt] == "-":
            flg = False

    cnt+=1
    
if flg ==True:
    print("Yes")
else:
    print("No")

Solution (Python):
a,b  = map(int, input().split())
nums = list("1234567890")
S = input()
for i,s in enumerate(S):
    if i == a and s != "-":
        print("No")
        exit()
    elif i != a and s not in nums:
        print("No")
        exit()
print("Yes")

Solution (Python):
import re

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

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

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

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

if str.isdecimal(S[0: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 S[A] != '-':
    print("No")

elif S.count('-') != 1:
    print("No")

else:
    print("Yes")

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=input()
num=[str(k) for k in range(10)]

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

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

match = True
for i in range(A+B+1):
    if i == A:
        if S[i] != "-":
            print("No")
            match = False
            break
    else:
        if S[i] not in ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"]:
            print("No")
            match = False
            break
            
if match:
    print("Yes")

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

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

flag = True
if not(len(S) == A+B+1):
    flag = False
if not(S[A] == '-'):
    flag = False
for i in range(A+B+1):
    if i != A:
        if not(48<=ord(S[i])<=57):
            flag = False
if flag:
    print('Yes')
else:
    print('No')

Solution (Python):
a,b = map(int, input().split())
s = input()
N = set(['1','2','3','4','5','6','7','8','9','0'])
i = 0
ans = 'Yes'
while i < a:
  if not s[i] in N:
    ans = 'No'
  i += 1

if not s[i] == '-':
  ans = 'No'
i += 1

while i < a+b+1:
  if not s[i] in N:
    ans = 'No'
  i += 1
print(ans)

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

s = list(input())[::-1]

for _ in [0]*a:
  if not s.pop().isdigit():
    print("No")
    exit()
if s.pop() != '-':
    print("No")
    exit()

for _ in [0]*b:
  if not s.pop().isdigit():
    print("No")
    exit()
print("Yes")

Solution (Python):

import sys
import math
from bisect import bisect_left, bisect_right, insort_left, insort_right
from collections import defaultdict, deque, Counter
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from heapq import heappop, heappush
from itertools import accumulate, groupby, product, permutations, combinations, combinations_with_replacement
from math import ceil, floor, factorial, log, sqrt, sin, cos
from operator import itemgetter
from string import ascii_lowercase, ascii_uppercase, digits
sys.setrecursionlimit(10**7)
rs = lambda: sys.stdin.readline().rstrip()
ri = lambda: int(rs())
rf = lambda: float(rs())
rs_ = lambda: [_ for _ in rs().split()]
ri_ = lambda: [int(_) for _ in rs().split()]
rf_ = lambda: [float(_) for _ in rs().split()]
INF = float('inf')
MOD = 10 ** 9 + 7
PI = math.pi

A, B = ri_()
S = rs()
f = 0
if len(S) == A + B + 1 and S[A] == '-' and all([i in digits for i in S[:A]+S[A+1:]]):
    f = 1
print('Yes' if f else 'No')

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

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

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

numbers = set([str(i) for i in range(10)])
flag = 0
for s in S[:a]:
  if not s in numbers:
    flag = -1

if S[a] != "-":
  flag = -1

for s in S[a+1:]:
  if not s in numbers:
    flag = -1

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

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

Solution (Python):
a,b = map(int,input().split())
stg = input()
res = "Yes"
for i in range(a):
  if not stg[i].isdigit():
    res = "No"
if not stg[a]=='-':
  res = "No"
for i in range(a+1,a+b+1):
  if not stg[i].isdigit():
    res = "No"
print(res)

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

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

ans=False
cnt=0
for i in range(length):
  if S[i]=="-":
    cnt+=1
  if i == A and S[i] == "-":
    ans=True
print('Yes' if ans==True and cnt==1 else 'No')

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

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

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,sqrt
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7


a,b=MI()
s=input().rstrip()
s=list(s)
count=0
lis=[str(i) for i in range(10)]
if len(s)!=a+b+1:
    print("No")
    
    sys.exit()
if s[a]!="-":
    
    print("No")
    sys.exit()
for i in range(a):
    if not(s[i] in lis):
        
        print("No")
        sys.exit()
for i in range(a+1,a+b+1):
    if not(s[i] in lis):
        
        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_list = list(input())
flag = True

if s_list[a] == "-":
    s_list.pop(a)
    for digit in s_list:
        if digit == "-":
            flag = False
            break
else:
    flag = False

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

Solution (Python):
A, B = map(int, input().split())
S = list(input())
a = ''.join(S[0:A])
b = ''.join(S[A+1:A+2+B])
c = S[A]
if str.isdecimal(a) and str.isdecimal(b) and c == '-':
  print('Yes')
else:
  print('No')

Solution (Python):
n,m = map(int, input().split())
s = input()
num = '0123456789'
flg = 0
for i in range(len(s)):
  if i < n-1:
    if s[i] not in num:
      flg = 1
  elif i == n:
    if s[i] != '-':
      flg = 1
  else:
    if s[i] not in num:
      flg = 1
if flg == 0:
  print('Yes')
else:
  print('No')

Solution (Python):
import sys, string
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = 10**20
def I(): return int(input())
def F(): return float(input())
def S(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()

def resolve():
    A, B = LI()
    Str = S()

    is_ok = True
    for i, e in enumerate(Str):
        if i==A:
            if e!='-':
                is_ok = False
        else:
            if not e in string.digits:
                is_ok = False
    
    if is_ok:
        print('Yes')
    else:
        print('No')

    
if __name__ == '__main__':
    resolve()

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

Solution (Python):
a,b=map(int,input().split())
s=input()
keep=0
for i in range(0,a):
  if not 48<=ord(s[i])<=57:
    keep=1
    break
if not s[a]=="-":
  keep=1
for j in range(a+1,a+b+1):
  if not 48<=ord(s[j])<=57:
    keep=1
    break
print(["No","Yes"][keep==0])

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

Solution (Python):
A, B = map(int, input().split())
N = list(input())
num = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0']

for i in range(len(N)+1):
    if i == len(N):
        print('Yes')
    elif i == A:
        if N[i] == '-':
            continue
        else:
            print('No')
            break
    else:
        if N[i] in num:
            continue
        else:
            print('No')
            break

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

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()

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

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()

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

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

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

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

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

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

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().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()

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

print("No")

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

ans='Yes'
if S[A]!='-':
    ans='No'

for i in range(A):
    if S[i]=='-':
        ans='No'

for j in range(A+1,A+B+1):
    if S[j]=='-':
        ans='No'

print(ans)

Solution (Python):
A, B = map(int, input().split())
S = input()
c = [str(i) for i in range(10)]
ans = True
for i in range(len(S)):
  if i == A and S[i] != '-':
    ans = False
  if i != A and S[i] not in c:
    ans = False
if ans:
  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[a+1:]:
    print("Yes")
else:
    print("No")

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

if S.isdecimal():
    print("No")
else:
    s = list(map(str, S))
    del s[A]

    count = s.count("-")

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

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

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

length = A + B + 1
index_of_hyphen = A
ans = 'No'

if len(S) == length and S.pop(index_of_hyphen) == '-':
    ans = 'Yes'
    for s in S:
        if s == '-':
            ans = 'No'
            break

print(ans)

Solution (Python):


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

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

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

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

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

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

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

Solution (Python):
import numpy as np
import sys

input = sys.stdin.readline

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

S = input()


res = True
if S.count('-') != 1:
    res = False
else:
    x,y = S.split('-')
    y = y[:-1]
    if len(x) != A or len(y) != B:
        res = False
    else:
        res = (x.isdecimal() and y.isdecimal())

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