import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    String[] str = sc.next().split("-");
    if(str.length == 2){
      if(str[0].length() == a && str[1].length() == b){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      }
    }else{
      System.out.println("No");
    }
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    String[] str = sc.next().split("-");
    if(str.length == 2){
      if(str[0].length() == a && str[1].length() == b){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      }
    }else{
      System.out.println("No");
    }
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    String[] str = sc.next().split("-");
    if(str.length == 2){
      if(str[0].length() == a && str[1].length() == b){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      }
    }else{
      System.out.println("No");
    }
  } main {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    String[] str = sc.next().split("-");
    if(str.length == 2){
      if(str[0].length() == a && str[1].length() == b){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      }
    }else{
      System.out.println("No");
    }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc String[] str = sc.next().split("-"); str sc.next().split("-") sc.next().split sc.next() sc.next sc "-" if(str.length == 2){
      if(str[0].length() == a && str[1].length() == b){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      }
    }else{
      System.out.println("No");
    } str.length == 2 str.length str str.length 2 {
      if(str[0].length() == a && str[1].length() == b){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      }
    } if(str[0].length() == a && str[1].length() == b){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      } str[0].length() == a && str[1].length() == b str[0].length() == a str[0].length() str[0].length str[0] str 0 a str[1].length() == b str[1].length() str[1].length str[1] str 1 b {
        System.out.println("Yes");
      } System.out.println("Yes") System.out.println System.out System System.out "Yes" {
        System.out.println("No");
      } System.out.println("No") System.out.println System.out System System.out "No" {
      System.out.println("No");
    } System.out.println("No") System.out.println System.out System System.out "No" String[] args args public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    String[] str = sc.next().split("-");
    if(str.length == 2){
      if(str[0].length() == a && str[1].length() == b){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      }
    }else{
      System.out.println("No");
    }
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    String[] str = sc.next().split("-");
    if(str.length == 2){
      if(str[0].length() == a && str[1].length() == b){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      }
    }else{
      System.out.println("No");
    }
  }
} Main
import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    String[] str = sc.next().split("-");
    if(str.length == 2){
      if(str[0].length() == a && str[1].length() == b){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      }
    }else{
      System.out.println("No");
    }
  }
}