import java.util.Scanner;

class Main{
        public static void main(String[] args){
                Scanner scn=new Scanner(System.in);
                int a=scn.nextInt();
                int b=scn.nextInt();
                String str=scn.next();
                char c;
                for(int i=0;i<a;i++){
                        c=str.charAt(i);
                        if('0'>c || c>'9'){
                                System.out.println("No");
                                return;
                        }
                }

                if(str.charAt(a)!='-'){
                        System.out.println("No");
                        return;
                }
                for(int i=0;i<b;i++){
                        c=str.charAt(a+1+i);
                        if('0'>c || c>'9'){
                                System.out.println("No");
                                return;
                        }
                }
                System.out.println("Yes");
        }
} import java.util.Scanner; Scanner java.util class Main{
        public static void main(String[] args){
                Scanner scn=new Scanner(System.in);
                int a=scn.nextInt();
                int b=scn.nextInt();
                String str=scn.next();
                char c;
                for(int i=0;i<a;i++){
                        c=str.charAt(i);
                        if('0'>c || c>'9'){
                                System.out.println("No");
                                return;
                        }
                }

                if(str.charAt(a)!='-'){
                        System.out.println("No");
                        return;
                }
                for(int i=0;i<b;i++){
                        c=str.charAt(a+1+i);
                        if('0'>c || c>'9'){
                                System.out.println("No");
                                return;
                        }
                }
                System.out.println("Yes");
        }
} Main public static void main(String[] args){
                Scanner scn=new Scanner(System.in);
                int a=scn.nextInt();
                int b=scn.nextInt();
                String str=scn.next();
                char c;
                for(int i=0;i<a;i++){
                        c=str.charAt(i);
                        if('0'>c || c>'9'){
                                System.out.println("No");
                                return;
                        }
                }

                if(str.charAt(a)!='-'){
                        System.out.println("No");
                        return;
                }
                for(int i=0;i<b;i++){
                        c=str.charAt(a+1+i);
                        if('0'>c || c>'9'){
                                System.out.println("No");
                                return;
                        }
                }
                System.out.println("Yes");
        } main {
                Scanner scn=new Scanner(System.in);
                int a=scn.nextInt();
                int b=scn.nextInt();
                String str=scn.next();
                char c;
                for(int i=0;i<a;i++){
                        c=str.charAt(i);
                        if('0'>c || c>'9'){
                                System.out.println("No");
                                return;
                        }
                }

                if(str.charAt(a)!='-'){
                        System.out.println("No");
                        return;
                }
                for(int i=0;i<b;i++){
                        c=str.charAt(a+1+i);
                        if('0'>c || c>'9'){
                                System.out.println("No");
                                return;
                        }
                }
                System.out.println("Yes");
        } Scanner scn=new Scanner(System.in); scn new Scanner(System.in) int a=scn.nextInt(); a scn.nextInt() scn.nextInt scn int b=scn.nextInt(); b scn.nextInt() scn.nextInt scn String str=scn.next(); str scn.next() scn.next scn char c; c for(int i=0;i<a;i++){
                        c=str.charAt(i);
                        if('0'>c || c>'9'){
                                System.out.println("No");
                                return;
                        }
                } int i=0; int i=0; i 0 i<a i a i++ i++ i {
                        c=str.charAt(i);
                        if('0'>c || c>'9'){
                                System.out.println("No");
                                return;
                        }
                } {
                        c=str.charAt(i);
                        if('0'>c || c>'9'){
                                System.out.println("No");
                                return;
                        }
                } c=str.charAt(i) c str.charAt(i) str.charAt str i if('0'>c || c>'9'){
                                System.out.println("No");
                                return;
                        } '0'>c || c>'9' '0'>c '0' c c>'9' c '9' {
                                System.out.println("No");
                                return;
                        } System.out.println("No") System.out.println System.out System System.out "No" return; if(str.charAt(a)!='-'){
                        System.out.println("No");
                        return;
                } str.charAt(a)!='-' str.charAt(a) str.charAt str 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<b;i++){
                        c=str.charAt(a+1+i);
                        if('0'>c || c>'9'){
                                System.out.println("No");
                                return;
                        }
                } int i=0; int i=0; i 0 i<b i b i++ i++ i {
                        c=str.charAt(a+1+i);
                        if('0'>c || c>'9'){
                                System.out.println("No");
                                return;
                        }
                } {
                        c=str.charAt(a+1+i);
                        if('0'>c || c>'9'){
                                System.out.println("No");
                                return;
                        }
                } c=str.charAt(a+1+i) c str.charAt(a+1+i) str.charAt str a+1+i a+1+i a 1 i if('0'>c || c>'9'){
                                System.out.println("No");
                                return;
                        } '0'>c || c>'9' '0'>c '0' c c>'9' c '9' {
                                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
import java.util.Scanner;

class Main{
        public static void main(String[] args){
                Scanner scn=new Scanner(System.in);
                int a=scn.nextInt();
                int b=scn.nextInt();
                String str=scn.next();
                char c;
                for(int i=0;i<a;i++){
                        c=str.charAt(i);
                        if('0'>c || c>'9'){
                                System.out.println("No");
                                return;
                        }
                }

                if(str.charAt(a)!='-'){
                        System.out.println("No");
                        return;
                }
                for(int i=0;i<b;i++){
                        c=str.charAt(a+1+i);
                        if('0'>c || c>'9'){
                                System.out.println("No");
                                return;
                        }
                }
                System.out.println("Yes");
        }
}