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-----
3 4
269-6650

-----Sample Output-----
Yes

The (A+1)-th character of S is -, and the other characters are digits from 0 through 9, so it follows the format.
[{"code": "a,b = list(map(int, input().split()))\ns = input()\ncount = 0\nans = 'Yes'\nfor i in range(a+b+1):\n  if i == a:\n    if s[i] != '-':\n      ans = 'No'\n      break\n  else:\n    if s[i] == '-':\n      ans = 'No'\n      break\nprint(ans)\n", "passed": true, "time": 0.24, "memory": 14316.0, "status": "done"}, {"code": "A, B = map(int, input().split())\nS = input()\nD = [ str(i) for i in range(10)]\nT = S[:A] + S[A+1:]\n\nif S[A] == \"-\" and all( t in D for t in T):\n  print(\"Yes\")\nelse:\n  print(\"No\")", "passed": true, "time": 0.14, "memory": 14104.0, "status": "done"}, {"code": "a, b = map(int, input().split())\ns = input()\n\nA = s[:a]\ncon = s[a]\nB = s[-b:]\n\nflg = True\nnum = [str(x) for x in range(10)]\nnum = set(num)\n\nfor x in A:\n    if x not in num:\n        flg = False\n\nfor x in B:\n    if x not in num:\n        flg = False\n\nif con != \"-\":\n    flg = False\n\nprint(\"Yes\" if flg else \"No\")", "passed": true, "time": 0.26, "memory": 14096.0, "status": "done"}, {"code": "li = [\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\"]\na,b = map(int,input().split())\ns = input()\nfor i in range(a+b):\n    if i != a:\n        if s[i] not in li:\n            print(\"No\")\n            return\n    else:\n        if s[i] != \"-\":\n            print(\"No\")\n            return\nprint(\"Yes\")", "passed": true, "time": 0.15, "memory": 14124.0, "status": "done"}, {"code": "a, b = map(int, input().split())\ns = input()\n\nif len(s.split('-')) == 2 and s[a] == '-':\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.23, "memory": 14280.0, "status": "done"}, {"code": "a,b=map(int,input().split())\ns=list(input())\nif s[a]=='-':\n    c=0\n    for i in range(0,a+b+1):\n        if s[i].isdecimal()==True:\n            c=c+1\n    if c==a+b:\n        print('Yes')\n    else:\n        print('No')\nelse:\n    print('No')", "passed": true, "time": 0.14, "memory": 14112.0, "status": "done"}, {"code": "a,b=input().split()\nc=input()\na=int(a)\nb=int(b)\nd=0\nif c[a]==\"-\":\n  for i in range(a+b+1):\n    if c[i]==\"-\":\n      d=d+1\n  if d==1:\n    print(\"Yes\")\n  else:\n    print(\"No\")\nelse:\n  print(\"No\")", "passed": true, "time": 0.22, "memory": 14332.0, "status": "done"}, {"code": "import re\na,b = input().split()\ns = input()\nif re.match(r'\\d{' + a + '}-\\d{' + b + '}', s):\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.15, "memory": 14336.0, "status": "done"}, {"code": "import sys\nA, B = [int(x) for x in input().split()]\nS = list(input())\nfor i in range(A+B+1):\n  if(i==A):\n    if(S[i]!='-'):\n      print('No')\n      return\n  else:\n    if(str.isdecimal(S[i])==False):\n      print('No')\n      return\nprint('Yes')", "passed": true, "time": 0.22, "memory": 14108.0, "status": "done"}, {"code": "a, b = map(int, input().split())\ns = input()\nt = s.split('-')\nprint('Yes' if s[a] == '-' and len(t) == 2 else 'No')", "passed": true, "time": 0.16, "memory": 14244.0, "status": "done"}, {"code": "dg = \"0123456789\"\n\nA,B = map(int,input().split())\nS = input()\n\npostcode = True\nfor i, ch in enumerate(S):\n  if i == A:\n    if ch != \"-\":\n      postcode = False\n      break\n  else:\n    if ch not in dg:\n      postcode = False\n      break\n      \nif postcode:\n  print(\"Yes\")\nelse:\n  print(\"No\")", "passed": true, "time": 0.16, "memory": 14252.0, "status": "done"}, {"code": "A, B = list(map(int, input().split()))\nS = input()\n\nif S[A] == '-' and '-' not in S[:A] and '-' not in S[-B:]:\n    print('Yes')\nelse:\n    print('No')\n", "passed": true, "time": 0.26, "memory": 14076.0, "status": "done"}, {"code": "a,b=map(int, input().split())\ns=input()\nres=\"No\"\nif s[a]==\"-\":\n    if s[:a].isdecimal() and s[a+1:].isdecimal():\n        res=\"Yes\"\nprint(res)", "passed": true, "time": 0.14, "memory": 14104.0, "status": "done"}, {"code": "import re\na,b = list(map(int,input().split()))\ns = input()\nif s[a]==\"-\":\n  if \"-\" not in s[:a]+s[(a+1):]:\n    print(\"Yes\")\n    return\nprint(\"No\")", "passed": true, "time": 0.14, "memory": 14172.0, "status": "done"}, {"code": "a,b=map(int, input().split())\ns=input()\n\nif len(s)==a+b+1 and s[a]==\"-\" and s.count(\"-\")==1:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14308.0, "status": "done"}, {"code": "a, b = map(int, input().split())\ns = input()\nif s[a] == \"-\" and s.count(\"-\") == 1:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.17, "memory": 14188.0, "status": "done"}, {"code": "import re\nA, B = list(map(int, input().split()))\nS = input()\nn_pattern = \"[0-9]\"\nres  = \"Yes\"\nfor i in range(A+B+1):\n  if i < A:\n    if re.match(n_pattern, S[i]) is None:\n      res = \"No\"\n      break\n  elif i == A:\n    if S[i] != \"-\":\n      res = \"No\"\n      break\n  else:\n    if re.match(n_pattern, S[i]) is None:\n      res = \"No\"\n      break\n  \nprint(res)\n", "passed": true, "time": 0.17, "memory": 14140.0, "status": "done"}, {"code": "a,b = map(int,input().split())\ns = list(input())\nans ='No'\n\nif s.count('-') == 1:\n     ind = s.index('-')\n     alen = ind\n     blen = len(s)-(ind+1)\n\n     if alen == a and blen == b:\n         ans = 'Yes'\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14144.0, "status": "done"}, {"code": "a,b = list(map(int,input().split()))\ns =input()\nfor i in range(a+b+1):\n    if i == a:\n        if s[i] !='-':\n            print('No')\n            break\n    else:\n        if s[i]=='-':\n            print(\"No\")\n            break\n            \n        else:\n            if int(s[i])<0 or 9<int(s[i]):\n                print(\"No\")\n                break\nelse:\n    print('Yes')", "passed": true, "time": 0.14, "memory": 14064.0, "status": "done"}, {"code": "a,b = list(map(int,input().split()))\ns = input()\n\nnum = list(map(str,list(range(10))))\n\nflag = True\nfor i in range(a):\n    if s[i] not in num:\n        flag = False\nif s[a] != \"-\":\n    flag = False\nfor i in range(a+1,a+b+1):\n    if s[i] not in num:\n        flag = False\n\nif flag:\n    print(\"Yes\")\nelse:\n    print(\"No\")\n", "passed": true, "time": 0.21, "memory": 14256.0, "status": "done"}, {"code": "import re\nA,B = input().split()\nS = input()\n\nmy_regex = r\"\\d{\" + A + r\"}-\\d{\"+ B +r\"}\"\n\nif re.fullmatch(my_regex, S) == None:\n  print('No')\n  \nelse:\n  print('Yes')", "passed": true, "time": 0.14, "memory": 14068.0, "status": "done"}, {"code": "A, B = map(int, input().split())\nS = input()\n\nflag = False\nif S[A] == '-':\n    S_ = S.split('-')\n    if len(S_) == 2:\n        if len(S_[0]) == A and len(S_[1]) == B:\n            if S_[0].isdigit() and S_[1].isdigit():\n                flag = True\n\nif flag:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.14, "memory": 14212.0, "status": "done"}, {"code": "A, B = map(int, input().split())\nS = input()\n\nif S.find(\"-\") == S.rfind(\"-\") == A:\n  print(\"Yes\")\nelse:\n  print(\"No\")", "passed": true, "time": 0.19, "memory": 14160.0, "status": "done"}, {"code": "a, b = list(map(int, input().split()))\ns = input()\nans = True\nfor i in range(a + b + 1):\n    if s[a] != \"-\":\n        ans = False\n        break\n    else:\n        if i == a:\n            pass\n        else:\n            for j in range(10):\n                if s[i] == str(j):\n                    break\n            else:\n                ans = False\n\nif ans:\n    print(\"Yes\")\nelse:\n    print(\"No\")\n", "passed": true, "time": 0.14, "memory": 14292.0, "status": "done"}, {"code": "a,b=list(map(int,input().split()))\ns=input()\nif len(s) != a+b+1:\n    print('No')\n    return\nelse:\n    if s[a] != '-':\n        print('No')\n        return\n    else:\n        for i in range(0,a):\n            if s[i] == '-':\n                print('No')\n                return\n        for i in range(a+1,a+b+1):\n            if s[i] == '-':\n                print('No')\n                return\nprint('Yes')\n        \n", "passed": true, "time": 0.14, "memory": 14240.0, "status": "done"}, {"code": "a, b = map(int, input().split())\ns = input()\nif s[a] == '-' and s.count('-') == 1:\n  print(\"Yes\")\nelse:\n  print(\"No\")", "passed": true, "time": 0.98, "memory": 14192.0, "status": "done"}, {"code": "a,b = map(int, input().split())\ns = input()\nfor i in s[0:a]:\n    if 48 <= ord(i) and ord(i) <= 57:\n        continue\n    else:\n        print(\"No\")\n        return\nif s[a] != \"-\":\n    print(\"No\")\n    return\nfor i in s[a+1:a+b+1]:\n    if 48 <= ord(i) and ord(i) <= 57:\n        continue\n    else:\n        print(\"No\")\n        return\nprint(\"Yes\")", "passed": true, "time": 0.14, "memory": 14148.0, "status": "done"}, {"code": "a, b = map(int, input().split())\ns = input()\n\nres = s.split('-')\nif len(res) == 2:\n  if len(res[0]) == a and len(res[1]) == b and res[0].isdigit() and res[1].isdigit():\n    print('Yes')\n  else:\n    print('No')\nelse:\n  print('No')", "passed": true, "time": 0.14, "memory": 14132.0, "status": "done"}, {"code": "import sys\n\n\ndef LI():\n    return list(map(int, input().split()))\n\n\nA, B = LI()\nS = input()\nans = \"Yes\"\nfor i in range(A):\n    if S[i] == \"-\":\n        ans = \"No\"\n        break\nif S[A] != \"-\":\n    ans = \"No\"\nfor i in range(A+1, A+B+1):\n    if S[i] == \"-\":\n        ans = \"No\"\n        break\nprint(ans)\n", "passed": true, "time": 0.27, "memory": 14312.0, "status": "done"}, {"code": "A,B = map(int,input().split())\nS = input()\nfor i in range(A+B+1):\n    if i < A and S[i] == '-':\n        print('No')\n        return\n    elif i == A and S[i] != '-':\n        print('No')\n        return\n    elif i > A and S[i] == '-':\n        print('No')\n        return\nprint('Yes')", "passed": true, "time": 0.14, "memory": 14220.0, "status": "done"}, {"code": "A,B = list(map(int, input().split()))\nS = input()\nprint((\"Yes\" if S[A] == \"-\" and S.count(\"-\") == 1 else \"No\"))\n", "passed": true, "time": 0.14, "memory": 14324.0, "status": "done"}, {"code": "A,B=list(map(int,input().split()))\nS=input()\nif S.count('-')==1 and S[A]=='-':\n    print(\"Yes\")\nelse:\n    print(\"No\")\n", "passed": true, "time": 0.26, "memory": 14304.0, "status": "done"}, {"code": "a, b = map(int, input().split())\ns = input()\n\nif s[a] == \"-\" and len(s) == a + b + 1 and \"-\" not in s[:a] and \"-\" not in s[a+1:]:\n  print(\"Yes\")\nelse:\n  print(\"No\")", "passed": true, "time": 0.54, "memory": 14244.0, "status": "done"}, {"code": "a,b=map(int,input().split())\ns = input()\nx = ['0','1','2','3','4','5','6','7','8','9']\nif s[a] !='-':\n    print('No')\n    return\ns =list(s)\ndel s[a]\nfor i in s:\n    if i not in x:\n        print('No')\n        return\nprint('Yes')", "passed": true, "time": 0.23, "memory": 14284.0, "status": "done"}, {"code": "a, b = map(int, input().split())\ns = list(input())\n\nif len(s) == a + b + 1:\n\tif s[a] == \"-\":\n\t\tdel s[a]\n\t\ttry:\n\t\t\tif all([0 <= int(x) <= 9 for x in s]):\n\t\t\t\tprint(\"Yes\")\n\t\t\telse:\n\t\t\t\tprint(\"No\")\n\t\texcept:\n\t\t\tprint(\"No\")\n\telse:\n\t\tprint(\"No\")\nelse:\n\tprint(\"No\")", "passed": true, "time": 0.17, "memory": 14372.0, "status": "done"}, {"code": "a,b = map(int, input().split())\ns = input()\n\nif (\"-\" not in s[:a])&(\"-\" not in s[a+1:])&(s[a]==\"-\"):\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.23, "memory": 14100.0, "status": "done"}, {"code": "a,b = map(int,input().split())\ns = input()\nif len(s) == a + b + 1:\n    if s[a] == \"-\":\n        s = s.replace(\"-\",\"\")\n        if s.isdecimal() and len(s) == a + b:\n            print(\"Yes\")\n        else:\n            print(\"No\")\n    else:\n        print(\"No\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.22, "memory": 14240.0, "status": "done"}, {"code": "a,b = map(int,input().split())\nn = input()\nif 1<=a<=5 and 1<=b<=5:\n  if n[a]==\"-\":\n    if n[0:a].isdecimal() and n[a+1:a+b+1].isdecimal():\n      print(\"Yes\")\n      return\nprint(\"No\")", "passed": true, "time": 0.22, "memory": 14084.0, "status": "done"}, {"code": "a,b=map(int,input().split())\ns=str(input())\ne=[\"0\",'1','2','3','4','5','6','7','8','9']\nfor i in range(len(s)):\n  if a==i:\n    if s[i]!='-':\n      print(\"No\")\n      return\n  else:\n    if s[i] not in e:\n      print(\"No\")\n      return\n\nprint(\"Yes\")", "passed": true, "time": 0.24, "memory": 14320.0, "status": "done"}, {"code": "#Postal Code\nA,B=map(int,input().split())\nd=[\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\"]\nS=input()\ntotal=0\nfor i in range(A):\n    if S[i] in d:\n        pass\n    else:\n        total=1\nS=S[A:]\nif S[0]!=\"-\":\n    total=1\nS=S[1:]\nfor i in range(B):\n    if S[i] in d:\n        pass\n    else:\n        total=1\nif total==1:\n    print(\"No\")\nelse:\n    print(\"Yes\")", "passed": true, "time": 0.18, "memory": 14260.0, "status": "done"}, {"code": "A,B = map(int,input().split())\nS = str(input())\nfor i in range(len(S)):\n  if i < A:\n    if not S[i].isnumeric():\n      print(\"No\")\n      return\n  elif i == A:\n    if S[i] != \"-\":\n      print(\"No\")\n      return\n  else:\n    if not S[i].isnumeric():\n      print(\"No\")\n      return\nprint(\"Yes\")", "passed": true, "time": 0.17, "memory": 14328.0, "status": "done"}, {"code": "import re\n\na, b = map(int, input().split())\ns = input()\ns = re.sub(r\"[0-9]\", \"+\", s)\nif s[0:a].count(\"+\") == a and s[a] == \"-\" and s[a+1:a+b+1].count(\"+\") == b:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.22, "memory": 14136.0, "status": "done"}, {"code": "A,B = map(int, input().split())\nS = input()\nprint(\"Yes\" if S[A] == \"-\" and S.count(\"-\") == 1 else \"No\")", "passed": true, "time": 0.14, "memory": 14056.0, "status": "done"}, {"code": "a, b = list(map(int, input().split()))\ns = input()\n\nif s[:a].isdecimal() and s[a] == '-' and s[a+1:].isdecimal():\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.14, "memory": 14068.0, "status": "done"}, {"code": "A, B = list(map(int, input().split()))\nS = input()\nprint((\"Yes\" if S[A] == \"-\" and S.count(\"-\") == 1 else \"No\"))\n", "passed": true, "time": 0.14, "memory": 14124.0, "status": "done"}, {"code": "def mapt(fn, *args):\n    return tuple(map(fn, *args))\n\n\ndef Input():\n    return mapt(int, input().split(\" \"))\n\n\ndef main():\n    a, b = Input()\n    s = input()\n\n    if all(chr == \"-\" if index==a else chr.isdigit() for index, chr in enumerate(s)):\n        print(\"Yes\")\n    else:\n        print(\"No\")\n\n\nmain()", "passed": true, "time": 0.23, "memory": 14172.0, "status": "done"}, {"code": "a,b = map(int,input().split())\ns = str(input())\n\nif len(s)== a+b+1 \\\n    and s[a:a+1] =='-' \\\n    and str.isdecimal(s[0:a]) \\\n    and str.isdecimal(s[a+1:a+1+b]):\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.16, "memory": 14296.0, "status": "done"}, {"code": "a,b = map(int, input().split())\ns = str(input())\n#print(s[a+1])\n\nif s[a] == \"-\" and s.count(\"-\") == 1:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.2, "memory": 14240.0, "status": "done"}, {"code": "import re\nA, B = map(int, input().split())\nS = input()\npattern = re.compile('[0-9]'*A + '-' +'[0-9]'*B)\nprint('Yes' if pattern.fullmatch(S) != None else 'No')", "passed": true, "time": 0.14, "memory": 14128.0, "status": "done"}, {"code": "a,b=map(int,input().split())\nl=input().split('-')\nif(len(l[0])==a and len(l[1])==b):\n  print(\"Yes\")\nelse:\n  print(\"No\")", "passed": true, "time": 0.14, "memory": 14260.0, "status": "done"}, {"code": "A, B = list(map(int, input().split()))\nS = input()\ncnt = 0\n\nfor i in S:\n    if i == '-':\n        cnt += 1\n\nif cnt == 1:\n    post = S.split('-')\n    if len(post[0]) == A and len(post[1]) == B:\n        print('Yes')\n        return\n\nprint('No')\n", "passed": true, "time": 0.14, "memory": 14316.0, "status": "done"}, {"code": "a,b = map(int,input().split())\ns = input()\nif s.count('-') == 1 and s[a] =='-':\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.18, "memory": 14088.0, "status": "done"}, {"code": "a, b = list(map(int, input().split()))\ns = input()\n\nans = True\n\nfor (i, char) in enumerate(s):\n    if i == a:\n        if char == '-':\n            ans = True\n        else:\n            ans = False\n            break\n    else:\n        try:\n            ans = type(int(char)) is int\n        except:\n            ans = False\n            break\n\nif ans:\n    print('Yes')\nelse:\n    print('No')\n", "passed": true, "time": 0.14, "memory": 14344.0, "status": "done"}, {"code": "a,b=map(int,input().split())\nn = input()\nif n[0:a].isdecimal() and n[a]==\"-\" and n[a+1:a+b+1].isdecimal():\n  print(\"Yes\")\nelse:\n  print(\"No\")", "passed": true, "time": 0.14, "memory": 14108.0, "status": "done"}, {"code": "A,B=map(int,input().split())\nS=input()\na=S[:A]\nb=S[A]\nc=S[A+1:]\nans=True\nfor i in range(A):\n  if a[i].isdigit()==False:\n    print('No')\n    return\nif b!='-':\n  print('No')\n  return\nfor i in range(B):\n  if c[i].isdigit()==False:\n    print('No')\n    return\nprint('Yes')", "passed": true, "time": 0.14, "memory": 14120.0, "status": "done"}, {"code": "lst = input().split()\nA = int(lst[0])\nB = int(lst[1])\ns = input()\n\nif (len(s) == (A + B + 1)) and (s.count('-') == 1) and (s[A] == '-'):\n   print('Yes')\nelse:\n   print('No')", "passed": true, "time": 0.14, "memory": 14236.0, "status": "done"}, {"code": "import re\nA, B = list(map(int, input().split()))\nS = input()\n\nans = 'No'\np = '\\d{' + str(A) + '}-\\d{' + str(B) + '}'\nif re.match(p, S):\n    ans = 'Yes'\nprint(ans)\n", "passed": true, "time": 0.14, "memory": 14372.0, "status": "done"}, {"code": "A, B = map(int, input().split())\nS = input()\n\nresult = 'Yes'\nif '-' in S[:A]:\n    result = 'No'\nif '-' not in S[A]:\n    result = 'No'\nif '-' in S[A+1:]:\n    result = 'No'\n\nprint(result)", "passed": true, "time": 0.14, "memory": 14140.0, "status": "done"}, {"code": "import sys\nA, B = map(int,input().split())\nS = input()\nfor i in range(A + B + 1):\n    if i == A:\n        if S[i] != '-':\n            print('No')\n            return\n    else:\n        if not S[i] in '0123456789':\n            print('No')\n            return\nprint('Yes')", "passed": true, "time": 0.26, "memory": 14044.0, "status": "done"}, {"code": "import re\na,b = list(map(int,input().split()))\ns = input()\nif re.search(r\"[0-9][0-9]*\",s[0:a]):\n  if s[a]==\"-\":\n    if re.search(r\"[0-9][0-9]*\",s[(a+1):]):\n      print(\"Yes\")\n      return\nprint(\"No\")", "passed": true, "time": 0.14, "memory": 14120.0, "status": "done"}, {"code": "a,b = map(int,input().split())\ns = input()\nc = 0\n\ndef is_int(s):\n\ttry:\n\t\tint(s)\n\t\treturn True\n\texcept ValueError:\n\t\treturn False\n\nfor i in range(a):\n\tif is_int(s[i]) == True:\n\t\tc += 1\nfor i in range(a+1,a+b):\n\tif is_int(s[i]) == True:\n\t\tc += 1\nif s[a] == '-' and c == len(s) - 2:\n\tprint('Yes')\nelse:\n\tprint('No')", "passed": true, "time": 0.14, "memory": 14204.0, "status": "done"}, {"code": "a,b = list(map(int,input().split()))\ns =input()\nfor i in range(a+b+1):\n    if i == a:\n        if s[i] !='-':\n            print('No')\n            break\n    else:\n        if s[i]=='-':\n            print(\"No\")\n            break\n            \n        else:\n            if int(s[i])<0 or 9<int(s[i]):\n                print(\"No\")\n                break\nelse:\n    print('Yes')", "passed": true, "time": 0.14, "memory": 14196.0, "status": "done"}, {"code": "#!/usr/bin/env python3\nimport sys\nsys.setrecursionlimit(10**6)\n\na, b = list(map(int, input().split()))\ns = str(input())\n\nx = s.split(\"-\")\n\nif len(x[0]) == a and len(x[1]) == b:\n    print(\"Yes\")\nelse:\n    print(\"No\")\n", "passed": true, "time": 0.26, "memory": 14300.0, "status": "done"}, {"code": "a, b = (int(i) for i in input().split())\ns = input()\nif '-' not in s[:a] and s[a] == '-' and '-' not in s[a + 1:]: print(\"Yes\")\nelse: print(\"No\")", "passed": true, "time": 0.14, "memory": 14268.0, "status": "done"}, {"code": "a, b = map(int, input().split())\ns = input()\nt = s[:a] + s[a+1:]\n\nif s[a]=='-' and '-' not in t:\n\tprint(\"Yes\")\nelse:\n\tprint(\"No\")", "passed": true, "time": 0.15, "memory": 14204.0, "status": "done"}, {"code": "a, b = map(int, input().split())\ns = input()\nans = 'Yes'\nfor i in range(len(s)):\n    if i > a + b:\n        ans = 'No'\n        break\n    if i == a:\n        if s[i] != '-':\n            ans = 'No'\n            break\n    elif not s[i].isdigit(): \n        ans = 'No'\n        break\nprint(ans)", "passed": true, "time": 0.2, "memory": 14284.0, "status": "done"}, {"code": "a,b=list(map(int,input().split()))\ns=input()\nif len(s) != a+b+1:\n    print('No')\n    return\nelse:\n    if s[a] != '-':\n        print('No')\n        return\n    elif s.count('-')!=1:\n        print('No')\n        return\nprint('Yes')\n        \n", "passed": true, "time": 0.26, "memory": 14196.0, "status": "done"}, {"code": "a,b=map(int,input().split())\nS=input()\nfor i in range(len(S)):\n  if i==a:\n    if S[i]!=\"-\":\n      print(\"No\")\n      break\n  else:\n    try:\n      Si = int(S[i])\n    except:\n      print(\"No\")\n      break\nelse:\n  print(\"Yes\")", "passed": true, "time": 0.14, "memory": 14060.0, "status": "done"}, {"code": "a, b = map(int, input().split())\ns = input()\nt = s[:a] + s[a+1:]\n\nif s[a]=='-' and '-' not in t:\n\tprint(\"Yes\")\nelse:\n  print(\"No\")", "passed": true, "time": 0.22, "memory": 14232.0, "status": "done"}, {"code": "import re\nimport sys\nA, B = map(int, input().split())\nS = input()\n\nif S[A] != '-':\n    print('No')\n    return\n\nS = S.replace('-', '')\n\nif len(S) == 0:\n    print('No')\n    return\n\ncount = 0\nfor i in range(len(S)):\n    if re.match(r'[0-9]', S[i]):\n        count += 1\n\nif count == A+B:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.22, "memory": 14220.0, "status": "done"}, {"code": "a,b= map(int, input().split())\ns = input()\n\nif (\"-\" in s) and s.count(\"-\") == 1:\n    s = s.split(\"-\")\n    if len(s[0]) == (a) and len(s[1]) == b:\n        print(\"Yes\")\n    else:\n        print(\"No\")\n\nelse:\n    print(\"No\")", "passed": true, "time": 0.15, "memory": 14104.0, "status": "done"}, {"code": "def main():\n    A, B = list(map(int, input().split()))\n    S = input()\n    cond = [\n        len(S) == A + B + 1,\n        S[A] == '-',\n        S[:A].isdigit(),\n        S[A + 1:].isdigit()\n    ]\n    print(('Yes' if all(cond) else 'No'))\n\n\ndef __starting_point():\n    main()\n\n__starting_point()", "passed": true, "time": 0.14, "memory": 14100.0, "status": "done"}, {"code": "a, b = map(int, input().split())\ns = input()\n\nnum = '0123456789'\n\nif all(s[i] in num for i in range(a)) and s[a] == '-' and all(s[-(i+1)] in num for i in range(b)):\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.14, "memory": 14100.0, "status": "done"}, {"code": "A,B = list(map(int,input().split()))\nL = ['0','1','2','3','4','5','6','7','8','9']\ns = str(input())\nfor i in range(len(s)):\n  if i == A:\n    if s[A] != '-':\n      print('No')\n      return\n  else:\n    b = s[i]\n    if b not in L:\n      print('No')\n      return\nprint('Yes')\n      \n", "passed": true, "time": 0.14, "memory": 14248.0, "status": "done"}, {"code": "a,b = map(int,input().split())\ns = input()\nif len(s) == a + b + 1 and s[a] == \"-\":\n    s = s.replace(\"-\",\"\")\n    if s.isdecimal() and len(s) == a + b:\n        print(\"Yes\")\n    else:\n        print(\"No\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14300.0, "status": "done"}, {"code": "a,b = list(map(int,input().split()))\ns = input()\nif len(s) == a+b+1:\n    if s[a] == '-':\n        cnt = 0\n        for i in range(len(s)):\n            if s[i]=='0'or s[i]=='1'or s[i]=='2'or s[i]=='3'or s[i]=='4'or s[i]=='5'or s[i]=='6'or s[i]=='7'or s[i]=='8'or s[i]=='9':\n                cnt += 1 \n        if cnt == a+b:\n            print('Yes')\n        else:\n            print('No')\n    else:\n        print('No')\nelse:\n    print('No')\n", "passed": true, "time": 0.23, "memory": 14080.0, "status": "done"}, {"code": "a, b = map(int,input().split())\ns = input()\nprint(\"Yes\" if s[:a].isdecimal() and s[a] == \"-\" and s[a+1:].isdecimal() else \"No\")", "passed": true, "time": 0.14, "memory": 14328.0, "status": "done"}, {"code": "\nA, B = list(map(int, input().split()))\nS = input()\n\nif len(S) != A+B+1:\n    print(\"No\")\n    return\n\nfor i in range(A+B+1):\n\n    if i == A:\n        if S[i] != \"-\":\n            print('No')\n            return\n    else:\n        if not('0' <= S[i] <= '9'):\n            print('No')\n            return\nprint('Yes')\n", "passed": true, "time": 0.16, "memory": 14356.0, "status": "done"}, {"code": "a,b=list(map(int,input().split()))\n\nS=input()\nd=0\nc=a+b+3\nfor i in range(a+b+1):\n\tif S[i]=='-':\n\t\tc=i+1\n\t\td+=1\n\nif c==a+1 and d==1:\n\tprint('Yes')\nelse:\n\tprint('No')\n", "passed": true, "time": 0.15, "memory": 14300.0, "status": "done"}, {"code": "#ABC084B\na,b = map(int,input().split())\ns = input()\nprint(\"Yes\" if s[a]==\"-\" and s.count(\"-\")==1 else \"No\")", "passed": true, "time": 0.14, "memory": 14252.0, "status": "done"}, {"code": "a, b = map(int, input().split())\ns = input().rstrip().split('-')\nif len(s) == 2 and len(s[0]) == a and len(s[1]) == b:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.14, "memory": 14232.0, "status": "done"}, {"code": "A,B = map(int,input().split())\nS = list(input().split(\"-\"))\n\ncheck = False\nif len(S) == 2:\n  s,t = S[0],S[1]\n  if A == len(s) and B == len(t):\n    check = True\n\nprint(\"Yes\" if check else \"No\")", "passed": true, "time": 0.14, "memory": 14192.0, "status": "done"}, {"code": "A, B = map(int, input().split())\nS = input()\nflag = True\nfor i in range(A + B + 1):\n    if i == A:\n        if S[i] != '-':\n            flag = False\n    else:\n        if S[i] == '-':\n            flag = False\nif flag:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14272.0, "status": "done"}, {"code": "A, B = map(int, input().split())\nS = input()\nflag = False\nfor i in range(A):\n  if S[i] == \"-\":\n    flag=True\nif S[A] != \"-\":\n  flag=True\nfor i in range(A+1, A+B+1):\n  if S[i] == \"-\":\n    flag=True\nif flag:\n  print(\"No\")\nelse:\n  print(\"Yes\")", "passed": true, "time": 0.14, "memory": 14224.0, "status": "done"}, {"code": "A, B = list(map(int, input().split()))\nS = input()\ncnt = 0\n\nfor i in S:\n    if i == '-':\n        cnt += 1\n\nif cnt == 1:\n    post = S.split('-')\n    if len(post[0]) == A and len(post[1]) == B:\n        print('Yes')\n        return\n\nprint('No')\n", "passed": true, "time": 0.14, "memory": 14212.0, "status": "done"}, {"code": "A,B=map(int,input().split())\nS=input()\nif S[:A].isdecimal() and S[A]=='-' and S[A+1:].isdecimal():\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.14, "memory": 14068.0, "status": "done"}, {"code": "import re\n\nA, B = map(int, input().split())\nS = input()\n\nformer = S[0:A]\nlater = S[(A+1):(A+B+3)]\n\nr_f = re.compile('\\d{' + str(A) + '}')\nr_l = re.compile('\\d{' + str(B) + '}')\n\nif r_f.findall(former) and r_l.findall(later) and S[A] == '-':\n  print('Yes')\nelse:\n  print('No')", "passed": true, "time": 0.14, "memory": 14340.0, "status": "done"}, {"code": "a,b = map(int,input().split())\ns = input()\nfor i in range(a+b+1):\n  if i == a:\n    if s[i] != \"-\":\n      print(\"No\")\n      return\n  else:\n    if s[i] == \"-\":\n      print(\"No\")\n      return\nprint(\"Yes\")", "passed": true, "time": 0.14, "memory": 14324.0, "status": "done"}, {"code": "a,b=map(int,input().split())\ns=input().split(\"-\")\nprint(\"Yes\" if len(s)==2 and len(s[0])==a and len(s[1])==b else \"No\")", "passed": true, "time": 0.14, "memory": 14200.0, "status": "done"}, {"code": "a, b = map(int, input().split())\ns = list(input())\ndef f():\n    for i in range(len(s)):\n        if i == a:\n            if s[i] != \"-\":\n                return \"No\"\n        else:\n            if s[i] == \"-\":\n                return \"No\"\n    return \"Yes\"\nprint(f())", "passed": true, "time": 0.15, "memory": 14244.0, "status": "done"}, {"code": "import math\n\nis_no = 0\nnum1, num2 = list(map(int, input().split()))\nstr1 = input()\ntable = list(str1)\ncount = 0\nfor i in range(len(str1)):\n    if table[i] == '-':\n        count += 1\n    else:\n        continue\nif count == 1 and table[num1] =='-':\n    print('Yes')\nelse:\n    print('No')\n", "passed": true, "time": 0.14, "memory": 14232.0, "status": "done"}, {"code": "# -*- coding:utf-8 -*-\nA,B = map(int,input().split())\nS = input()\n\n\n\nif S[:A].isdecimal() and S[A]==\"-\" and S[A+1:].isdecimal():\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14188.0, "status": "done"}, {"code": "A, B = map(int, input().split())\nS = list(input())\nAB = [0]*2\nf = 0\nfor s in S:\n    if s == \"-\" :\n        f = 1\n        continue\n    AB[f] += 1\nif AB[0] == A and AB[1] == B:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14164.0, "status": "done"}, {"code": "# 33\nA, B = map(int, input().split(' '))\nS = str(input())\n\nans = 'Yes'\nif S[A] != '-':\n    ans = 'No'\nelse:\n    S = S.replace('-', '', 1)\n    if S.isdecimal() == False:\n        ans = 'No'\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14296.0, "status": "done"}, {"code": "import re\n\n\ndef answer(a: int, b: int, s: str) -> str:\n    pattern = fr'\\d{{{a}}}-\\d{{{b}}}'\n    if re.match(pattern, s):\n        return 'Yes'\n    return 'No'\n\n\ndef main():\n    a, b = list(map(int, input().split()))\n    s = input()\n    print((answer(a, b, s)))\n\n\ndef __starting_point():\n    main()\n\n__starting_point()", "passed": true, "time": 0.14, "memory": 14076.0, "status": "done"}, {"code": "a, b = map(int, input().split())\ns = input()\n\nres = s.split('-')\nif len(res) == 2:\n  if len(res[0]) == a and len(res[1]) == b and res[0].isdigit() and res[1].isdigit():\n    print('Yes')\n  else:\n    print('No')\nelse:\n  print('No')", "passed": true, "time": 0.14, "memory": 14268.0, "status": "done"}, {"code": "a,b = map(int,input().split())\ns = input()\nif len(s) == a + b + 1 and s[a] == \"-\":\n    s = s.replace(\"-\",\"\")\n    if s.isdecimal() and len(s) == a + b:\n        print(\"Yes\")\n        return\nprint(\"No\")", "passed": true, "time": 0.14, "memory": 14188.0, "status": "done"}]