import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main
{

  public static void main
  (
    String[] args
  )
  {
    BufferedReader in_stream;
    String         in_str;
    String[]       in_str_split;

    int    in_A;
    int    in_B;
    String in_S;

    String  regex;
    Pattern pattern;
    Matcher matcher;

    try
    {

      in_stream    = new BufferedReader(new InputStreamReader(System.in));
      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");

      in_A = Integer.parseInt(in_str_split[0]);
      in_B = Integer.parseInt(in_str_split[1]);


      in_str = new String(in_stream.readLine());
      in_S   = in_str;


      regex = "[0-9]{" + in_A + "}-[0-9]{" + in_B + "}";
      pattern = Pattern.compile(regex);
      matcher = pattern.matcher(in_S);

      if(matcher.find())
      {
        UtilLog.ans_ln("Yes");
      }
      else
      {
        UtilLog.ans_ln("No");
      }
    }
    catch(Exception e)
    {
      e.printStackTrace();
    }
  }
}

class UtilLog
{
  private static boolean is_debug_mode = false;



  public static void ans_ln
  (
    String i_message
  )
  {
    System.out.println(i_message);
  }



  public static void ans_f
  (
    String i_message
  )
  {
    System.out.printf(i_message);
  }



  public static void inf_ln
  (
    String i_message
  )
  {
    StackTraceElement[] stack;


    if(is_debug_mode)
    {
    stack = new Throwable().getStackTrace();

    System.out.println
      (
        String.format
          (
            "[inf][%s:%s():%5d]",
            stack[1].getClassName(),
            stack[1].getMethodName(),
            stack[1].getLineNumber(),
            i_message
          )
      );
    }
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.regex.Matcher; Matcher java.util.regex import java.util.regex.Pattern; Pattern java.util.regex public class Main
{

  public static void main
  (
    String[] args
  )
  {
    BufferedReader in_stream;
    String         in_str;
    String[]       in_str_split;

    int    in_A;
    int    in_B;
    String in_S;

    String  regex;
    Pattern pattern;
    Matcher matcher;

    try
    {

      in_stream    = new BufferedReader(new InputStreamReader(System.in));
      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");

      in_A = Integer.parseInt(in_str_split[0]);
      in_B = Integer.parseInt(in_str_split[1]);


      in_str = new String(in_stream.readLine());
      in_S   = in_str;


      regex = "[0-9]{" + in_A + "}-[0-9]{" + in_B + "}";
      pattern = Pattern.compile(regex);
      matcher = pattern.matcher(in_S);

      if(matcher.find())
      {
        UtilLog.ans_ln("Yes");
      }
      else
      {
        UtilLog.ans_ln("No");
      }
    }
    catch(Exception e)
    {
      e.printStackTrace();
    }
  }
} Main public static void main
  (
    String[] args
  )
  {
    BufferedReader in_stream;
    String         in_str;
    String[]       in_str_split;

    int    in_A;
    int    in_B;
    String in_S;

    String  regex;
    Pattern pattern;
    Matcher matcher;

    try
    {

      in_stream    = new BufferedReader(new InputStreamReader(System.in));
      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");

      in_A = Integer.parseInt(in_str_split[0]);
      in_B = Integer.parseInt(in_str_split[1]);


      in_str = new String(in_stream.readLine());
      in_S   = in_str;


      regex = "[0-9]{" + in_A + "}-[0-9]{" + in_B + "}";
      pattern = Pattern.compile(regex);
      matcher = pattern.matcher(in_S);

      if(matcher.find())
      {
        UtilLog.ans_ln("Yes");
      }
      else
      {
        UtilLog.ans_ln("No");
      }
    }
    catch(Exception e)
    {
      e.printStackTrace();
    }
  } main {
    BufferedReader in_stream;
    String         in_str;
    String[]       in_str_split;

    int    in_A;
    int    in_B;
    String in_S;

    String  regex;
    Pattern pattern;
    Matcher matcher;

    try
    {

      in_stream    = new BufferedReader(new InputStreamReader(System.in));
      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");

      in_A = Integer.parseInt(in_str_split[0]);
      in_B = Integer.parseInt(in_str_split[1]);


      in_str = new String(in_stream.readLine());
      in_S   = in_str;


      regex = "[0-9]{" + in_A + "}-[0-9]{" + in_B + "}";
      pattern = Pattern.compile(regex);
      matcher = pattern.matcher(in_S);

      if(matcher.find())
      {
        UtilLog.ans_ln("Yes");
      }
      else
      {
        UtilLog.ans_ln("No");
      }
    }
    catch(Exception e)
    {
      e.printStackTrace();
    }
  } BufferedReader in_stream; in_stream String         in_str; in_str String[]       in_str_split; in_str_split int    in_A; in_A int    in_B; in_B String in_S; in_S String  regex; regex Pattern pattern; pattern Matcher matcher; matcher try
    {

      in_stream    = new BufferedReader(new InputStreamReader(System.in));
      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");

      in_A = Integer.parseInt(in_str_split[0]);
      in_B = Integer.parseInt(in_str_split[1]);


      in_str = new String(in_stream.readLine());
      in_S   = in_str;


      regex = "[0-9]{" + in_A + "}-[0-9]{" + in_B + "}";
      pattern = Pattern.compile(regex);
      matcher = pattern.matcher(in_S);

      if(matcher.find())
      {
        UtilLog.ans_ln("Yes");
      }
      else
      {
        UtilLog.ans_ln("No");
      }
    }
    catch(Exception e)
    {
      e.printStackTrace();
    } catch(Exception e)
    {
      e.printStackTrace();
    } Exception e {
      e.printStackTrace();
    } e.printStackTrace() e.printStackTrace e {

      in_stream    = new BufferedReader(new InputStreamReader(System.in));
      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");

      in_A = Integer.parseInt(in_str_split[0]);
      in_B = Integer.parseInt(in_str_split[1]);


      in_str = new String(in_stream.readLine());
      in_S   = in_str;


      regex = "[0-9]{" + in_A + "}-[0-9]{" + in_B + "}";
      pattern = Pattern.compile(regex);
      matcher = pattern.matcher(in_S);

      if(matcher.find())
      {
        UtilLog.ans_ln("Yes");
      }
      else
      {
        UtilLog.ans_ln("No");
      }
    } in_stream    = new BufferedReader(new InputStreamReader(System.in)) in_stream new BufferedReader(new InputStreamReader(System.in)) in_str       = new String(in_stream.readLine()) in_str new String(in_stream.readLine()) in_str_split = in_str.split(" ") in_str_split in_str.split(" ") in_str.split in_str " " in_A = Integer.parseInt(in_str_split[0]) in_A Integer.parseInt(in_str_split[0]) Integer.parseInt Integer in_str_split[0] in_str_split 0 in_B = Integer.parseInt(in_str_split[1]) in_B Integer.parseInt(in_str_split[1]) Integer.parseInt Integer in_str_split[1] in_str_split 1 in_str = new String(in_stream.readLine()) in_str new String(in_stream.readLine()) in_S   = in_str in_S in_str regex = "[0-9]{" + in_A + "}-[0-9]{" + in_B + "}" regex "[0-9]{" + in_A + "}-[0-9]{" + in_B + "}" in_B "}-[0-9]{" "[0-9]{" + in_A + "}-[0-9]{" + in_B + "}" "[0-9]{" in_A "}-[0-9]{" in_B "}" pattern = Pattern.compile(regex) pattern Pattern.compile(regex) Pattern.compile Pattern regex matcher = pattern.matcher(in_S) matcher pattern.matcher(in_S) pattern.matcher pattern in_S if(matcher.find())
      {
        UtilLog.ans_ln("Yes");
      }
      else
      {
        UtilLog.ans_ln("No");
      } matcher.find() matcher.find matcher {
        UtilLog.ans_ln("Yes");
      } UtilLog.ans_ln("Yes") UtilLog.ans_ln UtilLog "Yes" {
        UtilLog.ans_ln("No");
      } UtilLog.ans_ln("No") UtilLog.ans_ln UtilLog "No" String[] args args class UtilLog
{
  private static boolean is_debug_mode = false;



  public static void ans_ln
  (
    String i_message
  )
  {
    System.out.println(i_message);
  }



  public static void ans_f
  (
    String i_message
  )
  {
    System.out.printf(i_message);
  }



  public static void inf_ln
  (
    String i_message
  )
  {
    StackTraceElement[] stack;


    if(is_debug_mode)
    {
    stack = new Throwable().getStackTrace();

    System.out.println
      (
        String.format
          (
            "[inf][%s:%s():%5d]",
            stack[1].getClassName(),
            stack[1].getMethodName(),
            stack[1].getLineNumber(),
            i_message
          )
      );
    }
  }
} UtilLog private static boolean is_debug_mode = false; is_debug_mode false public static void ans_ln
  (
    String i_message
  )
  {
    System.out.println(i_message);
  } ans_ln {
    System.out.println(i_message);
  } System.out.println(i_message) System.out.println System.out System System.out i_message String i_message i_message public static void ans_f
  (
    String i_message
  )
  {
    System.out.printf(i_message);
  } ans_f {
    System.out.printf(i_message);
  } System.out.printf(i_message) System.out.printf System.out System System.out i_message String i_message i_message public static void inf_ln
  (
    String i_message
  )
  {
    StackTraceElement[] stack;


    if(is_debug_mode)
    {
    stack = new Throwable().getStackTrace();

    System.out.println
      (
        String.format
          (
            "[inf][%s:%s():%5d]",
            stack[1].getClassName(),
            stack[1].getMethodName(),
            stack[1].getLineNumber(),
            i_message
          )
      );
    }
  } inf_ln {
    StackTraceElement[] stack;


    if(is_debug_mode)
    {
    stack = new Throwable().getStackTrace();

    System.out.println
      (
        String.format
          (
            "[inf][%s:%s():%5d]",
            stack[1].getClassName(),
            stack[1].getMethodName(),
            stack[1].getLineNumber(),
            i_message
          )
      );
    }
  } StackTraceElement[] stack; stack if(is_debug_mode)
    {
    stack = new Throwable().getStackTrace();

    System.out.println
      (
        String.format
          (
            "[inf][%s:%s():%5d]",
            stack[1].getClassName(),
            stack[1].getMethodName(),
            stack[1].getLineNumber(),
            i_message
          )
      );
    } is_debug_mode {
    stack = new Throwable().getStackTrace();

    System.out.println
      (
        String.format
          (
            "[inf][%s:%s():%5d]",
            stack[1].getClassName(),
            stack[1].getMethodName(),
            stack[1].getLineNumber(),
            i_message
          )
      );
    } stack = new Throwable().getStackTrace() stack new Throwable().getStackTrace() new Throwable().getStackTrace new Throwable() System.out.println
      (
        String.format
          (
            "[inf][%s:%s():%5d]",
            stack[1].getClassName(),
            stack[1].getMethodName(),
            stack[1].getLineNumber(),
            i_message
          )
      ) System.out.println System.out System System.out String.format
          (
            "[inf][%s:%s():%5d]",
            stack[1].getClassName(),
            stack[1].getMethodName(),
            stack[1].getLineNumber(),
            i_message
          ) String.format String "[inf][%s:%s():%5d]" stack[1].getClassName() stack[1].getClassName stack[1] stack 1 stack[1].getMethodName() stack[1].getMethodName stack[1] stack 1 stack[1].getLineNumber() stack[1].getLineNumber stack[1] stack 1 i_message String i_message i_message public class Main
{

  public static void main
  (
    String[] args
  )
  {
    BufferedReader in_stream;
    String         in_str;
    String[]       in_str_split;

    int    in_A;
    int    in_B;
    String in_S;

    String  regex;
    Pattern pattern;
    Matcher matcher;

    try
    {

      in_stream    = new BufferedReader(new InputStreamReader(System.in));
      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");

      in_A = Integer.parseInt(in_str_split[0]);
      in_B = Integer.parseInt(in_str_split[1]);


      in_str = new String(in_stream.readLine());
      in_S   = in_str;


      regex = "[0-9]{" + in_A + "}-[0-9]{" + in_B + "}";
      pattern = Pattern.compile(regex);
      matcher = pattern.matcher(in_S);

      if(matcher.find())
      {
        UtilLog.ans_ln("Yes");
      }
      else
      {
        UtilLog.ans_ln("No");
      }
    }
    catch(Exception e)
    {
      e.printStackTrace();
    }
  }
} public class Main
{

  public static void main
  (
    String[] args
  )
  {
    BufferedReader in_stream;
    String         in_str;
    String[]       in_str_split;

    int    in_A;
    int    in_B;
    String in_S;

    String  regex;
    Pattern pattern;
    Matcher matcher;

    try
    {

      in_stream    = new BufferedReader(new InputStreamReader(System.in));
      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");

      in_A = Integer.parseInt(in_str_split[0]);
      in_B = Integer.parseInt(in_str_split[1]);


      in_str = new String(in_stream.readLine());
      in_S   = in_str;


      regex = "[0-9]{" + in_A + "}-[0-9]{" + in_B + "}";
      pattern = Pattern.compile(regex);
      matcher = pattern.matcher(in_S);

      if(matcher.find())
      {
        UtilLog.ans_ln("Yes");
      }
      else
      {
        UtilLog.ans_ln("No");
      }
    }
    catch(Exception e)
    {
      e.printStackTrace();
    }
  }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main
{

  public static void main
  (
    String[] args
  )
  {
    BufferedReader in_stream;
    String         in_str;
    String[]       in_str_split;

    int    in_A;
    int    in_B;
    String in_S;

    String  regex;
    Pattern pattern;
    Matcher matcher;

    try
    {

      in_stream    = new BufferedReader(new InputStreamReader(System.in));
      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");

      in_A = Integer.parseInt(in_str_split[0]);
      in_B = Integer.parseInt(in_str_split[1]);


      in_str = new String(in_stream.readLine());
      in_S   = in_str;


      regex = "[0-9]{" + in_A + "}-[0-9]{" + in_B + "}";
      pattern = Pattern.compile(regex);
      matcher = pattern.matcher(in_S);

      if(matcher.find())
      {
        UtilLog.ans_ln("Yes");
      }
      else
      {
        UtilLog.ans_ln("No");
      }
    }
    catch(Exception e)
    {
      e.printStackTrace();
    }
  }
}

class UtilLog
{
  private static boolean is_debug_mode = false;



  public static void ans_ln
  (
    String i_message
  )
  {
    System.out.println(i_message);
  }



  public static void ans_f
  (
    String i_message
  )
  {
    System.out.printf(i_message);
  }



  public static void inf_ln
  (
    String i_message
  )
  {
    StackTraceElement[] stack;


    if(is_debug_mode)
    {
    stack = new Throwable().getStackTrace();

    System.out.println
      (
        String.format
          (
            "[inf][%s:%s():%5d]",
            stack[1].getClassName(),
            stack[1].getMethodName(),
            stack[1].getLineNumber(),
            i_message
          )
      );
    }
  }
}
