import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main {

    public static boolean isInt(String str){
        for (int i = 0; i < str.length(); i++){
            if ( !(str.charAt(i)>= '0' && str.charAt(i) <='9')){
                return false;
            }
        }
        return true;
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int a = in.nextInt();
        int b = in.nextInt();
        String [] arr = in.next().split("-");
        if (arr.length == 2 && arr[0].length() == a && arr[1].length() == b){
            if (isInt(arr[0]) && isInt(arr[1]) ) {
                System.out.println("Yes");
                return;
            }
        }
        System.out.println("No");
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Scanner; Scanner java.util public class Main {

    public static boolean isInt(String str){
        for (int i = 0; i < str.length(); i++){
            if ( !(str.charAt(i)>= '0' && str.charAt(i) <='9')){
                return false;
            }
        }
        return true;
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int a = in.nextInt();
        int b = in.nextInt();
        String [] arr = in.next().split("-");
        if (arr.length == 2 && arr[0].length() == a && arr[1].length() == b){
            if (isInt(arr[0]) && isInt(arr[1]) ) {
                System.out.println("Yes");
                return;
            }
        }
        System.out.println("No");
    }
} Main public static boolean isInt(String str){
        for (int i = 0; i < str.length(); i++){
            if ( !(str.charAt(i)>= '0' && str.charAt(i) <='9')){
                return false;
            }
        }
        return true;
    } isInt {
        for (int i = 0; i < str.length(); i++){
            if ( !(str.charAt(i)>= '0' && str.charAt(i) <='9')){
                return false;
            }
        }
        return true;
    } for (int i = 0; i < str.length(); i++){
            if ( !(str.charAt(i)>= '0' && str.charAt(i) <='9')){
                return false;
            }
        } int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str i++ i++ i {
            if ( !(str.charAt(i)>= '0' && str.charAt(i) <='9')){
                return false;
            }
        } {
            if ( !(str.charAt(i)>= '0' && str.charAt(i) <='9')){
                return false;
            }
        } if ( !(str.charAt(i)>= '0' && str.charAt(i) <='9')){
                return false;
            } !(str.charAt(i)>= '0' && str.charAt(i) <='9') (str.charAt(i)>= '0' && str.charAt(i) <='9') str.charAt(i)>= '0' str.charAt(i) str.charAt str i '0' str.charAt(i) <='9' str.charAt(i) str.charAt str i '9' {
                return false;
            } return false; false return true; true String str str public static void main(String[] args) {
        Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int a = in.nextInt();
        int b = in.nextInt();
        String [] arr = in.next().split("-");
        if (arr.length == 2 && arr[0].length() == a && arr[1].length() == b){
            if (isInt(arr[0]) && isInt(arr[1]) ) {
                System.out.println("Yes");
                return;
            }
        }
        System.out.println("No");
    } main {
        Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int a = in.nextInt();
        int b = in.nextInt();
        String [] arr = in.next().split("-");
        if (arr.length == 2 && arr[0].length() == a && arr[1].length() == b){
            if (isInt(arr[0]) && isInt(arr[1]) ) {
                System.out.println("Yes");
                return;
            }
        }
        System.out.println("No");
    } Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in))); in new Scanner(new BufferedReader(new InputStreamReader(System.in))) int a = in.nextInt(); a in.nextInt() in.nextInt in int b = in.nextInt(); b in.nextInt() in.nextInt in String [] arr = in.next().split("-"); arr in.next().split("-") in.next().split in.next() in.next in "-" if (arr.length == 2 && arr[0].length() == a && arr[1].length() == b){
            if (isInt(arr[0]) && isInt(arr[1]) ) {
                System.out.println("Yes");
                return;
            }
        } arr.length == 2 && arr[0].length() == a && arr[1].length() == b arr.length == 2 && arr[0].length() == a && arr[1].length() == b arr.length == 2 arr.length arr arr.length 2 arr[0].length() == a arr[0].length() arr[0].length arr[0] arr 0 a arr[1].length() == b arr[1].length() arr[1].length arr[1] arr 1 b {
            if (isInt(arr[0]) && isInt(arr[1]) ) {
                System.out.println("Yes");
                return;
            }
        } if (isInt(arr[0]) && isInt(arr[1]) ) {
                System.out.println("Yes");
                return;
            } isInt(arr[0]) && isInt(arr[1]) isInt(arr[0]) isInt arr[0] arr 0 isInt(arr[1]) isInt arr[1] arr 1 {
                System.out.println("Yes");
                return;
            } System.out.println("Yes") System.out.println System.out System System.out "Yes" return; System.out.println("No") System.out.println System.out System System.out "No" String[] args args public class Main {

    public static boolean isInt(String str){
        for (int i = 0; i < str.length(); i++){
            if ( !(str.charAt(i)>= '0' && str.charAt(i) <='9')){
                return false;
            }
        }
        return true;
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int a = in.nextInt();
        int b = in.nextInt();
        String [] arr = in.next().split("-");
        if (arr.length == 2 && arr[0].length() == a && arr[1].length() == b){
            if (isInt(arr[0]) && isInt(arr[1]) ) {
                System.out.println("Yes");
                return;
            }
        }
        System.out.println("No");
    }
} public class Main {

    public static boolean isInt(String str){
        for (int i = 0; i < str.length(); i++){
            if ( !(str.charAt(i)>= '0' && str.charAt(i) <='9')){
                return false;
            }
        }
        return true;
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int a = in.nextInt();
        int b = in.nextInt();
        String [] arr = in.next().split("-");
        if (arr.length == 2 && arr[0].length() == a && arr[1].length() == b){
            if (isInt(arr[0]) && isInt(arr[1]) ) {
                System.out.println("Yes");
                return;
            }
        }
        System.out.println("No");
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main {

    public static boolean isInt(String str){
        for (int i = 0; i < str.length(); i++){
            if ( !(str.charAt(i)>= '0' && str.charAt(i) <='9')){
                return false;
            }
        }
        return true;
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int a = in.nextInt();
        int b = in.nextInt();
        String [] arr = in.next().split("-");
        if (arr.length == 2 && arr[0].length() == a && arr[1].length() == b){
            if (isInt(arr[0]) && isInt(arr[1]) ) {
                System.out.println("Yes");
                return;
            }
        }
        System.out.println("No");
    }
}