import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    int A = scanner.nextInt();
    int B = scanner.nextInt();
    char[] S = scanner.next().toCharArray();
    if (valid(S, A, B)) System.out.println("Yes");
    else System.out.println("No");
  }
  
  private static boolean valid(char[] S, int A, int B) {
    if (S.length != A + B + 1) return false;
    for (int i = 0; i < A; i++) {
      if (S[i] < '0' || S[i] > '9') return false;
    }
    if (S[A] != '-') return false;
    for (int i = A + 1; i < A + B + 1; i++) {
      if (S[i] < '0' || S[i] > '9') return false;
    }
    return true;
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    int A = scanner.nextInt();
    int B = scanner.nextInt();
    char[] S = scanner.next().toCharArray();
    if (valid(S, A, B)) System.out.println("Yes");
    else System.out.println("No");
  }
  
  private static boolean valid(char[] S, int A, int B) {
    if (S.length != A + B + 1) return false;
    for (int i = 0; i < A; i++) {
      if (S[i] < '0' || S[i] > '9') return false;
    }
    if (S[A] != '-') return false;
    for (int i = A + 1; i < A + B + 1; i++) {
      if (S[i] < '0' || S[i] > '9') return false;
    }
    return true;
  }
} Main public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    int A = scanner.nextInt();
    int B = scanner.nextInt();
    char[] S = scanner.next().toCharArray();
    if (valid(S, A, B)) System.out.println("Yes");
    else System.out.println("No");
  } main {
    Scanner scanner = new Scanner(System.in);

    int A = scanner.nextInt();
    int B = scanner.nextInt();
    char[] S = scanner.next().toCharArray();
    if (valid(S, A, B)) System.out.println("Yes");
    else System.out.println("No");
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int A = scanner.nextInt(); A scanner.nextInt() scanner.nextInt scanner int B = scanner.nextInt(); B scanner.nextInt() scanner.nextInt scanner char[] S = scanner.next().toCharArray(); S scanner.next().toCharArray() scanner.next().toCharArray scanner.next() scanner.next scanner if (valid(S, A, B)) System.out.println("Yes");
    else System.out.println("No"); valid(S, A, B) valid S A B System.out.println("Yes") System.out.println System.out System System.out "Yes" System.out.println("No") System.out.println System.out System System.out "No" String[] args args private static boolean valid(char[] S, int A, int B) {
    if (S.length != A + B + 1) return false;
    for (int i = 0; i < A; i++) {
      if (S[i] < '0' || S[i] > '9') return false;
    }
    if (S[A] != '-') return false;
    for (int i = A + 1; i < A + B + 1; i++) {
      if (S[i] < '0' || S[i] > '9') return false;
    }
    return true;
  } valid {
    if (S.length != A + B + 1) return false;
    for (int i = 0; i < A; i++) {
      if (S[i] < '0' || S[i] > '9') return false;
    }
    if (S[A] != '-') return false;
    for (int i = A + 1; i < A + B + 1; i++) {
      if (S[i] < '0' || S[i] > '9') return false;
    }
    return true;
  } if (S.length != A + B + 1) return false; S.length != A + B + 1 S.length S S.length A + B + 1 A + B + 1 A B 1 return false; false for (int i = 0; i < A; i++) {
      if (S[i] < '0' || S[i] > '9') return false;
    } int i = 0; int i = 0; i 0 i < A i A i++ i++ i {
      if (S[i] < '0' || S[i] > '9') return false;
    } {
      if (S[i] < '0' || S[i] > '9') return false;
    } if (S[i] < '0' || S[i] > '9') return false; S[i] < '0' || S[i] > '9' S[i] < '0' S[i] S i '0' S[i] > '9' S[i] S i '9' return false; false if (S[A] != '-') return false; S[A] != '-' S[A] S A '-' return false; false for (int i = A + 1; i < A + B + 1; i++) {
      if (S[i] < '0' || S[i] > '9') return false;
    } 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 (S[i] < '0' || S[i] > '9') return false;
    } {
      if (S[i] < '0' || S[i] > '9') return false;
    } if (S[i] < '0' || S[i] > '9') return false; S[i] < '0' || S[i] > '9' S[i] < '0' S[i] S i '0' S[i] > '9' S[i] S i '9' return false; false return true; true char[] S S int A A int B B public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    int A = scanner.nextInt();
    int B = scanner.nextInt();
    char[] S = scanner.next().toCharArray();
    if (valid(S, A, B)) System.out.println("Yes");
    else System.out.println("No");
  }
  
  private static boolean valid(char[] S, int A, int B) {
    if (S.length != A + B + 1) return false;
    for (int i = 0; i < A; i++) {
      if (S[i] < '0' || S[i] > '9') return false;
    }
    if (S[A] != '-') return false;
    for (int i = A + 1; i < A + B + 1; i++) {
      if (S[i] < '0' || S[i] > '9') return false;
    }
    return true;
  }
} public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    int A = scanner.nextInt();
    int B = scanner.nextInt();
    char[] S = scanner.next().toCharArray();
    if (valid(S, A, B)) System.out.println("Yes");
    else System.out.println("No");
  }
  
  private static boolean valid(char[] S, int A, int B) {
    if (S.length != A + B + 1) return false;
    for (int i = 0; i < A; i++) {
      if (S[i] < '0' || S[i] > '9') return false;
    }
    if (S[A] != '-') return false;
    for (int i = A + 1; i < A + B + 1; i++) {
      if (S[i] < '0' || S[i] > '9') return false;
    }
    return true;
  }
} Main
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    int A = scanner.nextInt();
    int B = scanner.nextInt();
    char[] S = scanner.next().toCharArray();
    if (valid(S, A, B)) System.out.println("Yes");
    else System.out.println("No");
  }
  
  private static boolean valid(char[] S, int A, int B) {
    if (S.length != A + B + 1) return false;
    for (int i = 0; i < A; i++) {
      if (S[i] < '0' || S[i] > '9') return false;
    }
    if (S[A] != '-') return false;
    for (int i = A + 1; i < A + B + 1; i++) {
      if (S[i] < '0' || S[i] > '9') return false;
    }
    return true;
  }
}
