import java.util.*;

public 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();
        try{
            Integer.parseInt(s.substring(0,a));
            if(s.charAt(a)!='-')throw new Exception();
            Integer.parseInt(s.substring(a+1));
            System.out.println("Yes");
        }catch(Exception e){
            System.out.println("No");
        }
    }

} import java.util.*; util.* java public 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();
        try{
            Integer.parseInt(s.substring(0,a));
            if(s.charAt(a)!='-')throw new Exception();
            Integer.parseInt(s.substring(a+1));
            System.out.println("Yes");
        }catch(Exception e){
            System.out.println("No");
        }
    }

} 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();
        try{
            Integer.parseInt(s.substring(0,a));
            if(s.charAt(a)!='-')throw new Exception();
            Integer.parseInt(s.substring(a+1));
            System.out.println("Yes");
        }catch(Exception e){
            System.out.println("No");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int a=sc.nextInt();
        int b=sc.nextInt();
        String s=sc.next();
        try{
            Integer.parseInt(s.substring(0,a));
            if(s.charAt(a)!='-')throw new Exception();
            Integer.parseInt(s.substring(a+1));
            System.out.println("Yes");
        }catch(Exception e){
            System.out.println("No");
        }
    } 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 try{
            Integer.parseInt(s.substring(0,a));
            if(s.charAt(a)!='-')throw new Exception();
            Integer.parseInt(s.substring(a+1));
            System.out.println("Yes");
        }catch(Exception e){
            System.out.println("No");
        } catch(Exception e){
            System.out.println("No");
        } Exception e {
            System.out.println("No");
        } System.out.println("No") System.out.println System.out System System.out "No" {
            Integer.parseInt(s.substring(0,a));
            if(s.charAt(a)!='-')throw new Exception();
            Integer.parseInt(s.substring(a+1));
            System.out.println("Yes");
        } Integer.parseInt(s.substring(0,a)) Integer.parseInt Integer s.substring(0,a) s.substring s 0 a if(s.charAt(a)!='-')throw new Exception(); s.charAt(a)!='-' s.charAt(a) s.charAt s a '-' throw new Exception(); new Exception() Integer.parseInt(s.substring(a+1)) Integer.parseInt Integer s.substring(a+1) s.substring s a+1 a 1 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) {
        Scanner sc = new Scanner(System.in);
        int a=sc.nextInt();
        int b=sc.nextInt();
        String s=sc.next();
        try{
            Integer.parseInt(s.substring(0,a));
            if(s.charAt(a)!='-')throw new Exception();
            Integer.parseInt(s.substring(a+1));
            System.out.println("Yes");
        }catch(Exception e){
            System.out.println("No");
        }
    }

} public 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();
        try{
            Integer.parseInt(s.substring(0,a));
            if(s.charAt(a)!='-')throw new Exception();
            Integer.parseInt(s.substring(a+1));
            System.out.println("Yes");
        }catch(Exception e){
            System.out.println("No");
        }
    }

} Main
import java.util.*;

public 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();
        try{
            Integer.parseInt(s.substring(0,a));
            if(s.charAt(a)!='-')throw new Exception();
            Integer.parseInt(s.substring(a+1));
            System.out.println("Yes");
        }catch(Exception e){
            System.out.println("No");
        }
    }

}