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