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 blank = sc.nextLine();
    String s = sc.nextLine();


    for(int i = 0; i < a; i++){
      if(!('0'<=s.charAt(i)) || !(s.charAt(i)<='9')){
        System.out.println("No");
        System.exit(0);
      }
    }
  

    if(!(s.charAt(a) == '-')){
      System.out.println("No");
      System.exit(0);
    }
  

    if(!(s.length() == a+b+1)){
      System.out.println("No");
      System.exit(0);
    }
  

    for(int i = a+1; i < a + b + 1; i++){
      if(!('0'<=s.charAt(i)) || !(s.charAt(i)<='9')){
        System.out.println("No");
        System.exit(0);
      }
    }

    System.out.println("Yes");
  }
} 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 blank = sc.nextLine();
    String s = sc.nextLine();


    for(int i = 0; i < a; i++){
      if(!('0'<=s.charAt(i)) || !(s.charAt(i)<='9')){
        System.out.println("No");
        System.exit(0);
      }
    }
  

    if(!(s.charAt(a) == '-')){
      System.out.println("No");
      System.exit(0);
    }
  

    if(!(s.length() == a+b+1)){
      System.out.println("No");
      System.exit(0);
    }
  

    for(int i = a+1; i < a + b + 1; i++){
      if(!('0'<=s.charAt(i)) || !(s.charAt(i)<='9')){
        System.out.println("No");
        System.exit(0);
      }
    }

    System.out.println("Yes");
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    String blank = sc.nextLine();
    String s = sc.nextLine();


    for(int i = 0; i < a; i++){
      if(!('0'<=s.charAt(i)) || !(s.charAt(i)<='9')){
        System.out.println("No");
        System.exit(0);
      }
    }
  

    if(!(s.charAt(a) == '-')){
      System.out.println("No");
      System.exit(0);
    }
  

    if(!(s.length() == a+b+1)){
      System.out.println("No");
      System.exit(0);
    }
  

    for(int i = a+1; i < a + b + 1; i++){
      if(!('0'<=s.charAt(i)) || !(s.charAt(i)<='9')){
        System.out.println("No");
        System.exit(0);
      }
    }

    System.out.println("Yes");
  } main {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    String blank = sc.nextLine();
    String s = sc.nextLine();


    for(int i = 0; i < a; i++){
      if(!('0'<=s.charAt(i)) || !(s.charAt(i)<='9')){
        System.out.println("No");
        System.exit(0);
      }
    }
  

    if(!(s.charAt(a) == '-')){
      System.out.println("No");
      System.exit(0);
    }
  

    if(!(s.length() == a+b+1)){
      System.out.println("No");
      System.exit(0);
    }
  

    for(int i = a+1; i < a + b + 1; i++){
      if(!('0'<=s.charAt(i)) || !(s.charAt(i)<='9')){
        System.out.println("No");
        System.exit(0);
      }
    }

    System.out.println("Yes");
  } 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 blank = sc.nextLine(); blank sc.nextLine() sc.nextLine sc String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc for(int i = 0; i < a; i++){
      if(!('0'<=s.charAt(i)) || !(s.charAt(i)<='9')){
        System.out.println("No");
        System.exit(0);
      }
    } int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
      if(!('0'<=s.charAt(i)) || !(s.charAt(i)<='9')){
        System.out.println("No");
        System.exit(0);
      }
    } {
      if(!('0'<=s.charAt(i)) || !(s.charAt(i)<='9')){
        System.out.println("No");
        System.exit(0);
      }
    } if(!('0'<=s.charAt(i)) || !(s.charAt(i)<='9')){
        System.out.println("No");
        System.exit(0);
      } !('0'<=s.charAt(i)) || !(s.charAt(i)<='9') !('0'<=s.charAt(i)) ('0'<=s.charAt(i)) '0' s.charAt(i) s.charAt s i !(s.charAt(i)<='9') (s.charAt(i)<='9') s.charAt(i) s.charAt s i '9' {
        System.out.println("No");
        System.exit(0);
      } System.out.println("No") System.out.println System.out System System.out "No" System.exit(0) System.exit System 0 if(!(s.charAt(a) == '-')){
      System.out.println("No");
      System.exit(0);
    } !(s.charAt(a) == '-') (s.charAt(a) == '-') s.charAt(a) s.charAt s a '-' {
      System.out.println("No");
      System.exit(0);
    } System.out.println("No") System.out.println System.out System System.out "No" System.exit(0) System.exit System 0 if(!(s.length() == a+b+1)){
      System.out.println("No");
      System.exit(0);
    } !(s.length() == a+b+1) (s.length() == a+b+1) s.length() s.length s a+b+1 a+b+1 a b 1 {
      System.out.println("No");
      System.exit(0);
    } System.out.println("No") System.out.println System.out System System.out "No" System.exit(0) System.exit System 0 for(int i = a+1; i < a + b + 1; i++){
      if(!('0'<=s.charAt(i)) || !(s.charAt(i)<='9')){
        System.out.println("No");
        System.exit(0);
      }
    } int i = a+1; int i = a+1; i a+1 a 1 i < a + b + 1 i a + b + 1 a + b + 1 a b 1 i++ i++ i {
      if(!('0'<=s.charAt(i)) || !(s.charAt(i)<='9')){
        System.out.println("No");
        System.exit(0);
      }
    } {
      if(!('0'<=s.charAt(i)) || !(s.charAt(i)<='9')){
        System.out.println("No");
        System.exit(0);
      }
    } if(!('0'<=s.charAt(i)) || !(s.charAt(i)<='9')){
        System.out.println("No");
        System.exit(0);
      } !('0'<=s.charAt(i)) || !(s.charAt(i)<='9') !('0'<=s.charAt(i)) ('0'<=s.charAt(i)) '0' s.charAt(i) s.charAt s i !(s.charAt(i)<='9') (s.charAt(i)<='9') s.charAt(i) s.charAt s i '9' {
        System.out.println("No");
        System.exit(0);
      } System.out.println("No") System.out.println System.out System System.out "No" System.exit(0) System.exit System 0 System.out.println("Yes") System.out.println System.out System System.out "Yes" 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 blank = sc.nextLine();
    String s = sc.nextLine();


    for(int i = 0; i < a; i++){
      if(!('0'<=s.charAt(i)) || !(s.charAt(i)<='9')){
        System.out.println("No");
        System.exit(0);
      }
    }
  

    if(!(s.charAt(a) == '-')){
      System.out.println("No");
      System.exit(0);
    }
  

    if(!(s.length() == a+b+1)){
      System.out.println("No");
      System.exit(0);
    }
  

    for(int i = a+1; i < a + b + 1; i++){
      if(!('0'<=s.charAt(i)) || !(s.charAt(i)<='9')){
        System.out.println("No");
        System.exit(0);
      }
    }

    System.out.println("Yes");
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    String blank = sc.nextLine();
    String s = sc.nextLine();


    for(int i = 0; i < a; i++){
      if(!('0'<=s.charAt(i)) || !(s.charAt(i)<='9')){
        System.out.println("No");
        System.exit(0);
      }
    }
  

    if(!(s.charAt(a) == '-')){
      System.out.println("No");
      System.exit(0);
    }
  

    if(!(s.length() == a+b+1)){
      System.out.println("No");
      System.exit(0);
    }
  

    for(int i = a+1; i < a + b + 1; i++){
      if(!('0'<=s.charAt(i)) || !(s.charAt(i)<='9')){
        System.out.println("No");
        System.exit(0);
      }
    }

    System.out.println("Yes");
  }
} 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 blank = sc.nextLine();
    String s = sc.nextLine();


    for(int i = 0; i < a; i++){
      if(!('0'<=s.charAt(i)) || !(s.charAt(i)<='9')){
        System.out.println("No");
        System.exit(0);
      }
    }
  

    if(!(s.charAt(a) == '-')){
      System.out.println("No");
      System.exit(0);
    }
  

    if(!(s.length() == a+b+1)){
      System.out.println("No");
      System.exit(0);
    }
  

    for(int i = a+1; i < a + b + 1; i++){
      if(!('0'<=s.charAt(i)) || !(s.charAt(i)<='9')){
        System.out.println("No");
        System.exit(0);
      }
    }

    System.out.println("Yes");
  }
}
