#!/usr/bin/env nim
import strutils, macros, sequtils, algorithm,hashes,tables,queues, nre
import future,math
import typetraits
# var (a,b,c) = readInts().unpack(3)
macro unpack*(rhs: seq,cnt: static[int]):auto  =
  let t = genSym();result = quote do:(let `t` = `rhs`;())
  when NimMajor == 0 and NimMinor < 17:
    for i in 0..<cnt:result[0][1].add(quote do:`t`[`i`])
  else:
    for i in 0..<cnt:result[1].add(quote do:`t`[`i`])

template readInt(): int=
  stdin.readLine.parseInt
template readInts(): seq[int]=
  stdin.readLine.split.map(parseInt)
template readMatrix(n:int): seq[seq[int]]=
  (0..<`n`).mapIt(stdin.readLine.split.map(parseInt))

var (a,b) = readInts.unpack 2
var s = stdin.readLine 
var r = re("^\\d{$1}-\\d{$2}$$" % [$a,$b])
if s.contains(r):
  echo "Yes"
else:
  echo "No"