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 S = sc.next();
    if (S.length() != A + B + 1 || S.charAt(A) != '-') {
      System.out.println("No");
      return;
    }
    for (int i = 0; i < A; i++) {
      char c = S.charAt(i);
      if (c < '0' || '9' < c) {
        System.out.println("No");
        return;
      }
    }
    for (int i = A+1; i < A+1+B; i++) {
      char c = S.charAt(i);
      if (c < '0' || '9' < c) {
        System.out.println("No");
        return;
      }
    }
    
    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 S = sc.next();
    if (S.length() != A + B + 1 || S.charAt(A) != '-') {
      System.out.println("No");
      return;
    }
    for (int i = 0; i < A; i++) {
      char c = S.charAt(i);
      if (c < '0' || '9' < c) {
        System.out.println("No");
        return;
      }
    }
    for (int i = A+1; i < A+1+B; i++) {
      char c = S.charAt(i);
      if (c < '0' || '9' < c) {
        System.out.println("No");
        return;
      }
    }
    
    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 S = sc.next();
    if (S.length() != A + B + 1 || S.charAt(A) != '-') {
      System.out.println("No");
      return;
    }
    for (int i = 0; i < A; i++) {
      char c = S.charAt(i);
      if (c < '0' || '9' < c) {
        System.out.println("No");
        return;
      }
    }
    for (int i = A+1; i < A+1+B; i++) {
      char c = S.charAt(i);
      if (c < '0' || '9' < c) {
        System.out.println("No");
        return;
      }
    }
    
    System.out.println("Yes");
  } main {
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    String S = sc.next();
    if (S.length() != A + B + 1 || S.charAt(A) != '-') {
      System.out.println("No");
      return;
    }
    for (int i = 0; i < A; i++) {
      char c = S.charAt(i);
      if (c < '0' || '9' < c) {
        System.out.println("No");
        return;
      }
    }
    for (int i = A+1; i < A+1+B; i++) {
      char c = S.charAt(i);
      if (c < '0' || '9' < c) {
        System.out.println("No");
        return;
      }
    }
    
    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 S = sc.next(); S sc.next() sc.next sc if (S.length() != A + B + 1 || S.charAt(A) != '-') {
      System.out.println("No");
      return;
    } S.length() != A + B + 1 || S.charAt(A) != '-' S.length() != A + B + 1 S.length() S.length S A + B + 1 A + B + 1 A B 1 S.charAt(A) != '-' S.charAt(A) S.charAt S A '-' {
      System.out.println("No");
      return;
    } System.out.println("No") System.out.println System.out System System.out "No" return; for (int i = 0; i < A; i++) {
      char c = S.charAt(i);
      if (c < '0' || '9' < c) {
        System.out.println("No");
        return;
      }
    } int i = 0; int i = 0; i 0 i < A i A i++ i++ i {
      char c = S.charAt(i);
      if (c < '0' || '9' < c) {
        System.out.println("No");
        return;
      }
    } {
      char c = S.charAt(i);
      if (c < '0' || '9' < c) {
        System.out.println("No");
        return;
      }
    } char c = S.charAt(i); c S.charAt(i) S.charAt S i if (c < '0' || '9' < c) {
        System.out.println("No");
        return;
      } c < '0' || '9' < c c < '0' c '0' '9' < c '9' c {
        System.out.println("No");
        return;
      } System.out.println("No") System.out.println System.out System System.out "No" return; for (int i = A+1; i < A+1+B; i++) {
      char c = S.charAt(i);
      if (c < '0' || '9' < c) {
        System.out.println("No");
        return;
      }
    } int i = A+1; int i = A+1; i A+1 A 1 i < A+1+B i A+1+B A+1+B A 1 B i++ i++ i {
      char c = S.charAt(i);
      if (c < '0' || '9' < c) {
        System.out.println("No");
        return;
      }
    } {
      char c = S.charAt(i);
      if (c < '0' || '9' < c) {
        System.out.println("No");
        return;
      }
    } char c = S.charAt(i); c S.charAt(i) S.charAt S i if (c < '0' || '9' < c) {
        System.out.println("No");
        return;
      } c < '0' || '9' < c c < '0' c '0' '9' < c '9' c {
        System.out.println("No");
        return;
      } System.out.println("No") System.out.println System.out System System.out "No" return; 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 S = sc.next();
    if (S.length() != A + B + 1 || S.charAt(A) != '-') {
      System.out.println("No");
      return;
    }
    for (int i = 0; i < A; i++) {
      char c = S.charAt(i);
      if (c < '0' || '9' < c) {
        System.out.println("No");
        return;
      }
    }
    for (int i = A+1; i < A+1+B; i++) {
      char c = S.charAt(i);
      if (c < '0' || '9' < c) {
        System.out.println("No");
        return;
      }
    }
    
    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 S = sc.next();
    if (S.length() != A + B + 1 || S.charAt(A) != '-') {
      System.out.println("No");
      return;
    }
    for (int i = 0; i < A; i++) {
      char c = S.charAt(i);
      if (c < '0' || '9' < c) {
        System.out.println("No");
        return;
      }
    }
    for (int i = A+1; i < A+1+B; i++) {
      char c = S.charAt(i);
      if (c < '0' || '9' < c) {
        System.out.println("No");
        return;
      }
    }
    
    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 S = sc.next();
    if (S.length() != A + B + 1 || S.charAt(A) != '-') {
      System.out.println("No");
      return;
    }
    for (int i = 0; i < A; i++) {
      char c = S.charAt(i);
      if (c < '0' || '9' < c) {
        System.out.println("No");
        return;
      }
    }
    for (int i = A+1; i < A+1+B; i++) {
      char c = S.charAt(i);
      if (c < '0' || '9' < c) {
        System.out.println("No");
        return;
      }
    }
    
    System.out.println("Yes");
  }
}