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



Sample input:
3 4
269-6650


Sample output:
Yes

Submission status: Wrong Answer

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

if ("-" in s) and s.count("-") == 1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import re
a,b= map(int, input().split())
s = input()

m = re.search(r'\d{1,5}-\d{1,5}',s)
if m is None:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
import re
a,b= map(int, input().split())
s = input()

m = re.search('[0-9]{1,5}-[0-9]{1,5}',s)
if m is None:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
import re


def answer(a: int, b: int, s: str) -> str:
    pattern = r'\d{1,5}-\d{1,5}'
    if re.match(pattern, s):
        return 'Yes'
    return 'No'


def main():
    a, b = map(int, input().split())
    s = input()
    print(answer(a, b, s))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

ans = True

for (i, char) in enumerate(s):
    if i == a:
        ans = char == '-'
    else:
        ans = type(char) is int

if ans:
    print('yes')
else:
    print('no')

Submission status: Wrong Answer

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

S=input()
d=0
c=a+b+3
for i in range(a+b+1):
	if S[i]=='-':
		c=i+1
		d+=1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

is_no = 0
num1, num2 = map(int, input().split())
str1 = input()
table = list(str1)
for i in range(num1):
    if table[i].isdigit():
        continue
    else:
        is_no = 1
if table[num1] != '-':
    is_no = 1
for j in range(num2, num1+num2+1):
    if table[j].isdigit():
        continue
    else:
        is_no = 1
if is_no == 0:
    print('Yes')
elif is_no == 1:
    print('No')

Submission status: Wrong Answer

Solution code:
import math

is_no = 0
num1, num2 = map(int, input().split())
str1 = input()
table = list(str1)
print(table)
for i in range(num1):
    if table[i].isdigit():
        continue
    else:
        is_no = 1
if table[num1] != '-':
    is_no = 1
for j in range(num2, num1+num2+1):
    if table[j].isdigit():
        continue
    else:
        is_no = 1
if is_no == 0:
    print('Yes')
elif is_no == 1:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
s = input().split('-')

if len(s) == 2:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import re
A, B = map(int, input().split())
S = [s for s in list(input()) if s != '-']
print("Yes") if len(S) == A + B else print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#Postal Code
A,B=map(int,input().split())
d=["0","1","2","3","4","5","6","7","8","9"]
S=input()
total=0
for i in range(A):
    if S[i] in d:
        pass
    else:
        total=1
S=S[A:]
if S[0]!="-":
    total=2
S=S[1:]
for i in range(B):
    if S[i] in d:
        pass
    else:
        total=3
if total==1:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
import re
a,b = list(map(int,input().split()))
s = input()
if re.search(r"[1-9][1-9]*",s[0:a]):
  if s[a]=="-":
    if re.search(r"[1-9][1-9]*",s[(a+1):]):
      print("Yes")
      exit()
print("No")

Submission status: Wrong Answer

Solution code:
import re
a,b = list(map(int,input().split()))
s = input()
if re.match(r"[1-9][1-9]*",s[0:a]):
  if s[a]=="-":
    if re.match(r"[1-9][1-9]*",s[(a+1):(a+b)]):
      if len(s)==a+b+1:
        print("Yes")
        exit()
print("No")

Submission status: Wrong Answer

Solution code:
import re
a,b = list(map(int,input().split()))
s = input()
if re.match(r"[1-9][1-9]*",s[0:a]):
  if s[a]=="-":
    if re.match(r"[1-9][1-9]*",s[(a+1):(a+b)]):
      print("Yes")
      exit()
print("No")

Submission status: Wrong Answer

Solution code:
import re
a,b = list(map(int,input().split()))
s = input()
if re.match(r"[1-9][1-9]*",s[:a]):
  if s[a]=="-":
    if re.match(r"[1-9][1-9]*",s[(a+1):(a+b)]):
      print("Yes")
      exit()
print("No")

Submission status: Wrong Answer

Solution code:
import re
a,b = list(map(int,input().split()))
s = input()
if re.match(r"[1-9][1-9]*",s[:a]):
  if s[a]=="-":
    if re.match(r"[1-9][1-9]*",s[(a+1):b]):
      print("Yes")
      exit()
print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import re
a,b = list(map(int,input().split()))
s = input()
if re.match(r"[1-9][1-9]*",s[:a]):
  if s[a]=="-":
    if re.match(r"[1-9][1-9]*",s[(a+1):]):
      print("Yes")
      exit()
print("No")

Submission status: Wrong Answer

Solution code:
import re
a,b = list(map(int,input().split()))
s = input()
if re.match(r"[1-9]*",s[:a]):
  if s[a]=="-":
    if re.match(r"[1-9]*",s[(a+1):]):
      print("Yes")
      exit()
print("No")

Submission status: Wrong Answer

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

if ("-" not in s[:a])&("-" not in s[b:])&(s.count("-")==1):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if (str.isdecimal(s[:a]))&(str.isdecimal(s[b:]))&(s[a]=="-"):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

if (str.isdigit(s[:a]))&(str.isdigit(s[b:]))&(s[a]=="-"):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

ok = True
ok = ok and  s[0:a].isdecimal()
ok = ok and s[a] == '-'
ok = ok and s[a+1:-1].isdecimal()

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

Submission status: Wrong Answer

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

ok = True
ok = ok and  s[0:a].isdecimal()
ok = ok and s[a] == '-'
ok = ok and s[a+1:-1].isdecimal()

if ok:
    print("yes")
else:
    print("no")

Submission status: Wrong Answer

Solution code:
import re
A, B = (int(x) for x in input().split())
S = input()
match = '\d' * A + '-' + '\d' * (B-1) 
ptn = re.compile(match)
print('Yes' if ptn.search(S) != None else 'No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
s=input()
t=True
if s[a]=="-":
    x,y=s[:a],s[a+1:]
    print(x,y)
    if "-" in x or "-" in y:
        t=False
else:
    t=False
print("Yes" if t else "No")

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
s=input()
t=True
if s[a]=="-":
    x,y=s[:a],s[a+1:]
    if len(x) != a or len(y) != b:
        t=False
else:
    t=False
print("Yes" if t else "No")

Submission status: Wrong Answer

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

ans="No"

if s[a]=="-":
  if s[:a].isdigit() and s[b:].isdigit():
    ans="Yes"

print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
#a,b=map(int,input().split())
#s=input()
a,b=3, 4
s="269-6650"

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

Submission status: Wrong Answer

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

ans="No"

if s[a]=="-":
  if s[0:a].isdigit() and s[b:len(s)].isdigit():
    ans="Yes"
    
print(ans)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
c=input()
n=c[0:a]
m=c[b:a+b+1]
o=c[a]
if n.isdecimal() and m.isdecimal() and o=='-':
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
S=list(input())
a=[]
for i in range(len(S)):
    if 0<=i and i<=A-1:
        if S[i].isdecimal()==True:
            a.append('Yes')
        else:
            a.append('No')
    elif i==A:
        if S[i]=='-':
            a.append('Yes')
        else:
            a.append('No')
    elif i<A :
        if S[i].isdecimal()==True:
            a.append('Yes')
        else:
            a.append('No')
if 'No' in a:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
s = [_ for _ in input()]

ok = True
for i in range(len(s)):
  if i == a+1:
    if s[i] != '-':
      ok = False
  elif ord('0') <= ord(s[i]) <= ord('9'):
     continue
  else:
    ok = False
if ok:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
def resolve():
    '''
    code here
    '''
    A, B = [int(item) for item in input().split()]
    S = input()

    if S[A] == '-' and len(S) >= 3:
        if '-' in S[:A] and '-' in S[-1*B:]:
            print('No')
        else:
            print('Yes')
    else:
        print('No')
if __name__ == "__main__":
    resolve()

Submission status: Wrong Answer

Solution code:
def resolve():
    '''
    code here
    '''
    A, B = [int(item) for item in input().split()]
    S = input()

    if S[A] == '-':
        if '-' in S[:A] and '-' in S[-1*B:]:
            print('No')
        else:
            print('Yes')
    else:
        print('No')
if __name__ == "__main__":
    resolve()

Submission status: Wrong Answer

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

if len(S) == A + B:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

count = "No"

if S[:A+1].isnumeric():
    if S[A+1] == "-":
        if len(S[A+2:]) == B and S[A+2:].isnumeric():
            count = "Yes"

print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
S=input()
if S[A]=="-":
  for i in range(A):
    if S[i]=="-":
      print("No")
      break
  else:
    for j in range(B):
      if S[-B-1]=="-":
        print("No")
        break
    else:
      print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
S = input()
if len(S) != A + B + 1:
    print("No")
elif S.count("-") == 0:
    print("No")
elif S.index("-") != A:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
N=list(str(input()))
if N[a]=="-":
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
A, B = map(int, input().split())
S = input()
if A<1 or B<1:
    print("No")
elif len(S)!=(A+B+1):
    print("No")
elif S[A]!="-":
    print("No")
else:
    s = S.replace("-", "")
    if s.isdigit():
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
A, B = map(int, input().split())
S = input()
if len(S)!=(A+B+1):
    print("No")
elif S[A]!="-":
    print("No")
else:
    s = S.replace("-", "")
    if s.isdigit():
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
S = input().strip()
try:
    if int(S[:A]) > 0 and int(S[-B:]) > 0 and S[A] == "-":
        print("Yes")
    else:
        print("No")
except:
    print("No")

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
S = input().split('-')

if len(S) == 2 and len(S[0]) == a:
    print('yes')
else:
    print('no')

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
s = input()
flg = 0
for i in range(a +b +1):
    try:
        if (0 <= int(s[i]) <= 9):
            if i == a:
                flg = 0
                break
    except:
        if i == a:
            flg = 1
        elif flg == 1:
            flg = 0
            break
        else:
            flg = 0
print("Yes" if flg == 1 else "No")

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
s = input()
flg = 0
for i in range(a +b +1):
    try:
        if (0 <= int(s[i]) <= 9):
            if i == a:
                flg = 0
    except:
        if i == a:
            flg = 1
        elif flg == 1:
            flg = 0
            break
        else:
            flg = 0
print("Yes" if flg == 1 else "No")

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
s = input()
flg = 0
for i in range(a +b):
    try:
        if (0 <= int(s[i]) <= 9):
            if i == a:
                flg = 0
    except:
        if i == a:
            flg = 1
        else:
            flg = 0
print("Yes" if flg == 1 else "No")

Submission status: Wrong Answer

Solution code:
a,b = map(int, raw_input().split())
s = raw_input()
def f(s):
	for l in s:
		if l not in map(str, range(10)): return False
	return True
print 'Yes' if s[a] == '-' and f(s[a+1:]) else 'No'

Submission status: Wrong Answer

Solution code:
a, b = map(int,input().split())
n = input()
s = "Yes"

A = n[:a]
B = n[b:]
if not A.isdecimal():
  s = "No"
if not n[a] == "-":
  s = "No"
if not B.isdecimal():
  s = "No"
print(s)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
S = str(input())
if S[a]=='-' and S[:a].isdecimal() and len(S[:a])==a and S[b:].isdecimal() and len(S[b:])==b:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
s=input()
res="Yes"
if s[a]!="-":
    res="No"
for i in range(0,a):
    if not 48 <= ord(s[i]) <=57:
        res="No"
print(res)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import re
a,b=input().split()
s=input()
match = re.search("\d{a}-\d{b}",s)
if match:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
a, b = list(map(int, input().split()))
s = list(input())
na = "".join(s[: a - 1]).isdigit()
nb = "".join(s[a + 1 :]).isdigit()
hf = s[a]
print("Yes") if na and nb and hf == "-" else print("No")

Submission status: Wrong Answer

Solution code:
def resolve():
    a, b = map(int, input().split())
    s = input()
    
    flag_len = False
    flag_bar = False
    flag_num = True
    if a+b+1 == len(s):
        flag_len = True
    if s.count("-") == 1:
        flag_bar = True
    if flag_len and flag_bar:
        for c in s:
            code = ord(c)
            if code < ord("0") or ord("9") < code:
                if code!= ord("-"):
                    flag_num == False
                    break
    if flag_len and flag_bar and flag_num:
        print("Yes")
    else:
        print("No")
resolve()

Submission status: Wrong Answer

Solution code:
def resolve():
    a, b = map(int, input().split())
    s = input()
    
    flag_len = False
    flag_bar = False
    flag_num = True
    if a+b+1 == len(s):
        flag_len = True
    if s.count("-") == 1:
        flag_bar = True
    if flag_len and flag_bar:
        for c in s:
            code = ord(c)
            if code!= ord("-"):
                if code < ord("0") or ord("9") < code:
                    flag_num == False
                    break
    if flag_len and flag_bar and flag_num:
        print("Yes")
    else:
        print("No")
resolve()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

lst = s.split("-")
#print(lst)
if len(lst[0]) == a and len(lst[1]) == b and len(lst) == 2:
    print("Yes")
else:
    print("no")

Submission status: Wrong Answer

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

lst = s.split("-")
print(lst)
if len(lst[0]) == a and len(lst[1]) == b and len(lst) == 2:
    print("Yes")
else:
    print("no")

Submission status: Wrong Answer

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

lst = s.split("-")
#print(lst)
if len(lst[0]) == a and len(lst[1]) == b:
    print("Yes")
else:
    print("no")

Submission status: Wrong Answer

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

lst = s.split("-")
#print(lst)
if len(lst[0]) == a and len(lst[-1]) == b:
    print("Yes")
else:
    print("no")

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
S=input()
flag = True
if not S[a]=="-":
  flag = False
if not S[0:a].isdigit():
  flag = False
if not S[a+1:].isdigit():
  falg = False
if flag:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
# スペース区切りの整数の入力
A, B = map(int, input().split())
S = input()

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

print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding:utf-8 -*-
import sys
sys.setrecursionlimit(10 ** 5)
input = sys.stdin.readline
mod = 1000000007
inf = float("INF")
def I(): return int(input().rstrip())
def IR(n): return [I() for _ in range(n)]
def LI(): return list(map(int, input().rstrip().split()))
def LIR(n): return [LI() for _ in range(n)]
def LI_(): return list(map(lambda x: int(x) - 1, input().rstrip().split()))
def LIR_(n): return [LI_() for _ in range(n)]
def F(): return float(input().rstrip())
def FR(n): return [F() for _ in range(n)]
def LF(): return list(map(float, input().rstrip().split()))
def LFR(n): return [LI() for _ in range(n)]
def S(): return input().rstrip()
def SR(n): return [S() for _ in range(n)]
def LS(): return list(sys.stdin.readline().rstrip().split())
def LSR(n): return [LS() for _ in range(n)]
# ↑template↑
# ↓solution↑
a, b = LI()
s = S()
if a == s.find('-') and b == len(s) - s.find('-') - 1:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

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

Ans = "yes"
print(Ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
x,y=map(int, input().split())
S=input()
if len(S)==x+y+1 and S[x]=='-':
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
x,y=map(int, input().split())
S=input()
if len(S)==x+y and S[x]=='-':
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys
a,b = map(int,input().split())
s = input()
if not s[:a].isdigit() or not s[a]=='-' or  not s[a+2:].isdigit():
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = "Yes" if s[:a].isdecimal and s[a] == "-" and s[a+1:].isdecimal else "No"

print(ans)

Submission status: Wrong Answer

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

flag = 0

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


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

Submission status: Wrong Answer

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

flag = 0
if len(s) == a+b+1:
    flag = 1

if s[:a] in "-" or s[b:] in "-":
    flag = 0

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

Submission status: Wrong Answer

Solution code:
###==================================================
### import
#import bisect
#from collections import Counter, deque, defaultdict
#from copy import deepcopy
#from functools import reduce, lru_cache
#from heapq import heappush, heappop
#import itertools
#import math
#import string
import sys
### stdin
def input(): return sys.stdin.readline()
def iIn(): return int(input())
def iInM(): return map(int, input().split())
def iInM1(): return map(int1, input().split())
def iInLH(): return list(map(int, input().split()))
def iInLH1(): return list(map(int1, input().split()))
def iInLV(n): return [iIn() for _ in range(n)]
def iInLV1(n): return [iIn()-1 for _ in range(n)]
def iInLD(n): return [iInLH() for _ in range(n)]
def iInLD1(n): return [iInLH1() for _ in range(n)]
def sInLH(): return list(input().split())
def sInLV(n): return [input().rstrip('\n') for _ in range(n)]
def sInLD(n): return [sInLH() for _ in range(n)]
### stdout
def OutH(lst, deli=' '): print(deli.join(map(str, lst)))
def OutV(lst): print('\n'.join(map(str, lst)))
### setting
sys.setrecursionlimit(10 ** 6)
### utils
int1 = lambda x: int(x) - 1
### constants
INF = int(1e9)
MOD = 1000000007
dx = (-1, 0, 1, 0)
dy = (0, -1, 0, 1)
###---------------------------------------------------

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

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

print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

cond = True

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

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
s = input()
if(s[a]=='-'):
    t = s[:a] + s[b:]
#     print(t)
    if(t.isdigit()==True):
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
a,b = map(int,input().split())
s = list(input())
if s[a] != "-":
	print("No")
	sys.exit()
else:
	print("Yes")

Submission status: Wrong Answer

Solution code:
import sys
a,b = map(int,input().split())
s = list(input())
if s[a] != "-":
	print("No")
	sys.exit()
s[s.index("-")] = "1"
for i in range(len(s)):
	if s[i].isdigit():
		if int(s[i]) >= 6 or int(s[i]) <= 0:
			print("No")
			sys.exit()
	else:
		print("No")
		sys.exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
import sys
a,b = map(int,input().split())
s = list(input())
print(s)
if s[a] != "-":
	print("No")
	sys.exit()
s[s.index("-")] = "1"
for i in range(len(s)):
	if s[i].isdigit():
		if int(s[i]) >= 6 or int(s[i]) <= 0:
			print("No")
			sys.exit()
	else:
		print("No")
		sys.exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
import sys
a,b = map(int,input().split())
s = list(input())
print(s)
if s[a] != "-":
	print("NO")
	sys.exit()
s[s.index("-")] = "1"
print(s)
for i in range(len(s)):
	if s[i].isdigit():
		if int(s[i]) >= 6 or int(s[i]) <= 0:
			print("No")
			sys.exit()
	else:
		print("No")
		sys.exit()
print("Yes")