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 N = sc.next();
    Boolean bool = true;
    
    try {
      int a = Integer.parseInt(N.substring(0, A));
      int b = Integer.parseInt(N.substring(A+1));
      bool = true;
    } catch (NumberFormatException nfex) {
		bool = false;
	}

    if(N.length() == A+B+1 && N.substring(A, A+1).equals("-") && bool) {
      System.out.println("Yes");
    } 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 N = sc.next();
    Boolean bool = true;
    
    try {
      int a = Integer.parseInt(N.substring(0, A));
      int b = Integer.parseInt(N.substring(A+1));
      bool = true;
    } catch (NumberFormatException nfex) {
		bool = false;
	}

    if(N.length() == A+B+1 && N.substring(A, A+1).equals("-") && bool) {
      System.out.println("Yes");
    } 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 N = sc.next();
    Boolean bool = true;
    
    try {
      int a = Integer.parseInt(N.substring(0, A));
      int b = Integer.parseInt(N.substring(A+1));
      bool = true;
    } catch (NumberFormatException nfex) {
		bool = false;
	}

    if(N.length() == A+B+1 && N.substring(A, A+1).equals("-") && bool) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  } main {
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    String N = sc.next();
    Boolean bool = true;
    
    try {
      int a = Integer.parseInt(N.substring(0, A));
      int b = Integer.parseInt(N.substring(A+1));
      bool = true;
    } catch (NumberFormatException nfex) {
		bool = false;
	}

    if(N.length() == A+B+1 && N.substring(A, A+1).equals("-") && bool) {
      System.out.println("Yes");
    } 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 N = sc.next(); N sc.next() sc.next sc Boolean bool = true; bool true try {
      int a = Integer.parseInt(N.substring(0, A));
      int b = Integer.parseInt(N.substring(A+1));
      bool = true;
    } catch (NumberFormatException nfex) {
		bool = false;
	} catch (NumberFormatException nfex) {
		bool = false;
	} NumberFormatException nfex {
		bool = false;
	} bool = false bool false {
      int a = Integer.parseInt(N.substring(0, A));
      int b = Integer.parseInt(N.substring(A+1));
      bool = true;
    } int a = Integer.parseInt(N.substring(0, A)); a Integer.parseInt(N.substring(0, A)) Integer.parseInt Integer N.substring(0, A) N.substring N 0 A int b = Integer.parseInt(N.substring(A+1)); b Integer.parseInt(N.substring(A+1)) Integer.parseInt Integer N.substring(A+1) N.substring N A+1 A 1 bool = true bool true if(N.length() == A+B+1 && N.substring(A, A+1).equals("-") && bool) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    } N.length() == A+B+1 && N.substring(A, A+1).equals("-") && bool N.length() == A+B+1 && N.substring(A, A+1).equals("-") && bool N.length() == A+B+1 N.length() N.length N A+B+1 A+B+1 A B 1 N.substring(A, A+1).equals("-") N.substring(A, A+1).equals N.substring(A, A+1) N.substring N A A+1 A 1 "-" bool {
      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" 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 N = sc.next();
    Boolean bool = true;
    
    try {
      int a = Integer.parseInt(N.substring(0, A));
      int b = Integer.parseInt(N.substring(A+1));
      bool = true;
    } catch (NumberFormatException nfex) {
		bool = false;
	}

    if(N.length() == A+B+1 && N.substring(A, A+1).equals("-") && bool) {
      System.out.println("Yes");
    } 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 N = sc.next();
    Boolean bool = true;
    
    try {
      int a = Integer.parseInt(N.substring(0, A));
      int b = Integer.parseInt(N.substring(A+1));
      bool = true;
    } catch (NumberFormatException nfex) {
		bool = false;
	}

    if(N.length() == A+B+1 && N.substring(A, A+1).equals("-") && bool) {
      System.out.println("Yes");
    } 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 N = sc.next();
    Boolean bool = true;
    
    try {
      int a = Integer.parseInt(N.substring(0, A));
      int b = Integer.parseInt(N.substring(A+1));
      bool = true;
    } catch (NumberFormatException nfex) {
		bool = false;
	}

    if(N.length() == A+B+1 && N.substring(A, A+1).equals("-") && bool) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  }
}