import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int A = in.nextInt();
        int B = in.nextInt();
        String S = in.next();

        for(int i = 0; i < A; i++){
            if (!Character.isDigit(S.charAt(i))){
                System.out.println("No");
                return;
            }
        }
        if(S.charAt(A) != '-'){
                System.out.println("No");
                return;
        }
        for(int i = A+1; i < A+1+B; i++){
            if (!Character.isDigit(S.charAt(i))){
                System.out.println("No");
                return;
            }
        }

        System.out.println("Yes");
        in.close();
    }
} import java.io.*; io.* java import java.util.*; util.* java import java.text.*; text.* java import java.math.*; math.* java import java.util.regex.*; regex.* java.util public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int A = in.nextInt();
        int B = in.nextInt();
        String S = in.next();

        for(int i = 0; i < A; i++){
            if (!Character.isDigit(S.charAt(i))){
                System.out.println("No");
                return;
            }
        }
        if(S.charAt(A) != '-'){
                System.out.println("No");
                return;
        }
        for(int i = A+1; i < A+1+B; i++){
            if (!Character.isDigit(S.charAt(i))){
                System.out.println("No");
                return;
            }
        }

        System.out.println("Yes");
        in.close();
    }
} Main public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int A = in.nextInt();
        int B = in.nextInt();
        String S = in.next();

        for(int i = 0; i < A; i++){
            if (!Character.isDigit(S.charAt(i))){
                System.out.println("No");
                return;
            }
        }
        if(S.charAt(A) != '-'){
                System.out.println("No");
                return;
        }
        for(int i = A+1; i < A+1+B; i++){
            if (!Character.isDigit(S.charAt(i))){
                System.out.println("No");
                return;
            }
        }

        System.out.println("Yes");
        in.close();
    } main {
        Scanner in = new Scanner(System.in);
        int A = in.nextInt();
        int B = in.nextInt();
        String S = in.next();

        for(int i = 0; i < A; i++){
            if (!Character.isDigit(S.charAt(i))){
                System.out.println("No");
                return;
            }
        }
        if(S.charAt(A) != '-'){
                System.out.println("No");
                return;
        }
        for(int i = A+1; i < A+1+B; i++){
            if (!Character.isDigit(S.charAt(i))){
                System.out.println("No");
                return;
            }
        }

        System.out.println("Yes");
        in.close();
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) int A = in.nextInt(); A in.nextInt() in.nextInt in int B = in.nextInt(); B in.nextInt() in.nextInt in String S = in.next(); S in.next() in.next in for(int i = 0; i < A; i++){
            if (!Character.isDigit(S.charAt(i))){
                System.out.println("No");
                return;
            }
        } int i = 0; int i = 0; i 0 i < A i A i++ i++ i {
            if (!Character.isDigit(S.charAt(i))){
                System.out.println("No");
                return;
            }
        } {
            if (!Character.isDigit(S.charAt(i))){
                System.out.println("No");
                return;
            }
        } if (!Character.isDigit(S.charAt(i))){
                System.out.println("No");
                return;
            } !Character.isDigit(S.charAt(i)) Character.isDigit(S.charAt(i)) Character.isDigit Character S.charAt(i) S.charAt S i {
                System.out.println("No");
                return;
            } System.out.println("No") System.out.println System.out System System.out "No" return; if(S.charAt(A) != '-'){
                System.out.println("No");
                return;
        } 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 = A+1; i < A+1+B; i++){
            if (!Character.isDigit(S.charAt(i))){
                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 {
            if (!Character.isDigit(S.charAt(i))){
                System.out.println("No");
                return;
            }
        } {
            if (!Character.isDigit(S.charAt(i))){
                System.out.println("No");
                return;
            }
        } if (!Character.isDigit(S.charAt(i))){
                System.out.println("No");
                return;
            } !Character.isDigit(S.charAt(i)) Character.isDigit(S.charAt(i)) Character.isDigit Character S.charAt(i) S.charAt S i {
                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" in.close() in.close in String[] args args public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int A = in.nextInt();
        int B = in.nextInt();
        String S = in.next();

        for(int i = 0; i < A; i++){
            if (!Character.isDigit(S.charAt(i))){
                System.out.println("No");
                return;
            }
        }
        if(S.charAt(A) != '-'){
                System.out.println("No");
                return;
        }
        for(int i = A+1; i < A+1+B; i++){
            if (!Character.isDigit(S.charAt(i))){
                System.out.println("No");
                return;
            }
        }

        System.out.println("Yes");
        in.close();
    }
} public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int A = in.nextInt();
        int B = in.nextInt();
        String S = in.next();

        for(int i = 0; i < A; i++){
            if (!Character.isDigit(S.charAt(i))){
                System.out.println("No");
                return;
            }
        }
        if(S.charAt(A) != '-'){
                System.out.println("No");
                return;
        }
        for(int i = A+1; i < A+1+B; i++){
            if (!Character.isDigit(S.charAt(i))){
                System.out.println("No");
                return;
            }
        }

        System.out.println("Yes");
        in.close();
    }
} Main
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int A = in.nextInt();
        int B = in.nextInt();
        String S = in.next();

        for(int i = 0; i < A; i++){
            if (!Character.isDigit(S.charAt(i))){
                System.out.println("No");
                return;
            }
        }
        if(S.charAt(A) != '-'){
                System.out.println("No");
                return;
        }
        for(int i = A+1; i < A+1+B; i++){
            if (!Character.isDigit(S.charAt(i))){
                System.out.println("No");
                return;
            }
        }

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