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, raw_input().split())
S = raw_input()

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

Solution (Python):
a, b = map(int, input().split())
s = input()
def check(d):
    return all(c in "0123456789" for c in d)
print("Yes"*(s[a]=='-'and check(s[:a])and check(s[a+1:]))or"No")

Solution (Python):
A,B = map(int,input().split())
S = input()
for i,c in enumerate(S):
    if i==A:
        if c!='-':
            print('No')
            exit()
    else:
        if c=='-':
            print('No')
            exit()
print('Yes')

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

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

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

	else:
		if not (S[i].isdigit()):
			print("No")
			exit(0)

print("Yes")

Solution (Python):
A, B = list(map(int, input().split()))
S = input()
def judge(A, B, S):
    if S[A] != '-':
        return False
    S = S[:A] + S[A+1:]
    num = '0123456789'
    for x in S:
        if x not in num:
            return False
    return True

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

Solution (Python):

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

Solution (Python):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

a, b = na()
s = ns().strip()
import re
if re.match("^[0-9]{" + str(a) + "}-[0-9]{" + str(b) + "}$", s):
    print("Yes")
else:
    print("No")