import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * author @sahil
 */
public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] str=br.readLine().split(" ");
        int A=Integer.parseInt(str[0]);
        int B=Integer.parseInt(str[1]);
        String s=br.readLine();
        if(s.length()!=(A+B+1) || s.charAt(A)!='-')
            System.out.println("No");
        else{
            int c=0;
            //System.out.println("hello");
            //System.out.println((int)s.charAt(A));
            for(int i=0;i<s.length();++i) {
                if(i==A) continue;
                if (!((int) s.charAt(i) >= 48 && (int) s.charAt(i) <= 57)) {
                    c = 1;
                    break;
                }
            }
            if(c==1) System.out.println("No");
                else
                System.out.println("Yes");
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] str=br.readLine().split(" ");
        int A=Integer.parseInt(str[0]);
        int B=Integer.parseInt(str[1]);
        String s=br.readLine();
        if(s.length()!=(A+B+1) || s.charAt(A)!='-')
            System.out.println("No");
        else{
            int c=0;
            //System.out.println("hello");
            //System.out.println((int)s.charAt(A));
            for(int i=0;i<s.length();++i) {
                if(i==A) continue;
                if (!((int) s.charAt(i) >= 48 && (int) s.charAt(i) <= 57)) {
                    c = 1;
                    break;
                }
            }
            if(c==1) System.out.println("No");
                else
                System.out.println("Yes");
        }
    }
} Main public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] str=br.readLine().split(" ");
        int A=Integer.parseInt(str[0]);
        int B=Integer.parseInt(str[1]);
        String s=br.readLine();
        if(s.length()!=(A+B+1) || s.charAt(A)!='-')
            System.out.println("No");
        else{
            int c=0;
            //System.out.println("hello");
            //System.out.println((int)s.charAt(A));
            for(int i=0;i<s.length();++i) {
                if(i==A) continue;
                if (!((int) s.charAt(i) >= 48 && (int) s.charAt(i) <= 57)) {
                    c = 1;
                    break;
                }
            }
            if(c==1) System.out.println("No");
                else
                System.out.println("Yes");
        }
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] str=br.readLine().split(" ");
        int A=Integer.parseInt(str[0]);
        int B=Integer.parseInt(str[1]);
        String s=br.readLine();
        if(s.length()!=(A+B+1) || s.charAt(A)!='-')
            System.out.println("No");
        else{
            int c=0;
            //System.out.println("hello");
            //System.out.println((int)s.charAt(A));
            for(int i=0;i<s.length();++i) {
                if(i==A) continue;
                if (!((int) s.charAt(i) >= 48 && (int) s.charAt(i) <= 57)) {
                    c = 1;
                    break;
                }
            }
            if(c==1) System.out.println("No");
                else
                System.out.println("Yes");
        }
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] str=br.readLine().split(" "); str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int A=Integer.parseInt(str[0]); A Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 int B=Integer.parseInt(str[1]); B Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 String s=br.readLine(); s br.readLine() br.readLine br if(s.length()!=(A+B+1) || s.charAt(A)!='-')
            System.out.println("No");
        else{
            int c=0;
            //System.out.println("hello");
            //System.out.println((int)s.charAt(A));
            for(int i=0;i<s.length();++i) {
                if(i==A) continue;
                if (!((int) s.charAt(i) >= 48 && (int) s.charAt(i) <= 57)) {
                    c = 1;
                    break;
                }
            }
            if(c==1) System.out.println("No");
                else
                System.out.println("Yes");
        } 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") System.out.println System.out System System.out "No" {
            int c=0;
            //System.out.println("hello");
            //System.out.println((int)s.charAt(A));
            for(int i=0;i<s.length();++i) {
                if(i==A) continue;
                if (!((int) s.charAt(i) >= 48 && (int) s.charAt(i) <= 57)) {
                    c = 1;
                    break;
                }
            }
            if(c==1) System.out.println("No");
                else
                System.out.println("Yes");
        } int c=0; c 0 for(int i=0;i<s.length();++i) {
                if(i==A) continue;
                if (!((int) s.charAt(i) >= 48 && (int) s.charAt(i) <= 57)) {
                    c = 1;
                    break;
                }
            } int i=0; int i=0; i 0 i<s.length() i s.length() s.length s ++i ++i i {
                if(i==A) continue;
                if (!((int) s.charAt(i) >= 48 && (int) s.charAt(i) <= 57)) {
                    c = 1;
                    break;
                }
            } {
                if(i==A) continue;
                if (!((int) s.charAt(i) >= 48 && (int) s.charAt(i) <= 57)) {
                    c = 1;
                    break;
                }
            } if(i==A) continue; i==A i A continue; if (!((int) s.charAt(i) >= 48 && (int) s.charAt(i) <= 57)) {
                    c = 1;
                    break;
                } !((int) s.charAt(i) >= 48 && (int) s.charAt(i) <= 57) ((int) s.charAt(i) >= 48 && (int) s.charAt(i) <= 57) (int) s.charAt(i) >= 48 (int) s.charAt(i) s.charAt s i 48 (int) s.charAt(i) <= 57 (int) s.charAt(i) s.charAt s i 57 {
                    c = 1;
                    break;
                } c = 1 c 1 break; if(c==1) System.out.println("No");
                else
                System.out.println("Yes"); c==1 c 1 System.out.println("No") System.out.println System.out System System.out "No" 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) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] str=br.readLine().split(" ");
        int A=Integer.parseInt(str[0]);
        int B=Integer.parseInt(str[1]);
        String s=br.readLine();
        if(s.length()!=(A+B+1) || s.charAt(A)!='-')
            System.out.println("No");
        else{
            int c=0;
            //System.out.println("hello");
            //System.out.println((int)s.charAt(A));
            for(int i=0;i<s.length();++i) {
                if(i==A) continue;
                if (!((int) s.charAt(i) >= 48 && (int) s.charAt(i) <= 57)) {
                    c = 1;
                    break;
                }
            }
            if(c==1) System.out.println("No");
                else
                System.out.println("Yes");
        }
    }
} public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] str=br.readLine().split(" ");
        int A=Integer.parseInt(str[0]);
        int B=Integer.parseInt(str[1]);
        String s=br.readLine();
        if(s.length()!=(A+B+1) || s.charAt(A)!='-')
            System.out.println("No");
        else{
            int c=0;
            //System.out.println("hello");
            //System.out.println((int)s.charAt(A));
            for(int i=0;i<s.length();++i) {
                if(i==A) continue;
                if (!((int) s.charAt(i) >= 48 && (int) s.charAt(i) <= 57)) {
                    c = 1;
                    break;
                }
            }
            if(c==1) System.out.println("No");
                else
                System.out.println("Yes");
        }
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * author @sahil
 */
public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] str=br.readLine().split(" ");
        int A=Integer.parseInt(str[0]);
        int B=Integer.parseInt(str[1]);
        String s=br.readLine();
        if(s.length()!=(A+B+1) || s.charAt(A)!='-')
            System.out.println("No");
        else{
            int c=0;
            //System.out.println("hello");
            //System.out.println((int)s.charAt(A));
            for(int i=0;i<s.length();++i) {
                if(i==A) continue;
                if (!((int) s.charAt(i) >= 48 && (int) s.charAt(i) <= 57)) {
                    c = 1;
                    break;
                }
            }
            if(c==1) System.out.println("No");
                else
                System.out.println("Yes");
        }
    }
}
