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 po=sc.next();
  String s[]=po.split("-",0);
  System.out.println((s.length==2)?(s[0].length()==a&&s[1].length()==b)?"Yes":"No":"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 po=sc.next();
  String s[]=po.split("-",0);
  System.out.println((s.length==2)?(s[0].length()==a&&s[1].length()==b)?"Yes":"No":"No");
}} Main public static void main(String[]args){
Scanner sc=new Scanner(System.in);
  int a=sc.nextInt();
  int b=sc.nextInt();
  String po=sc.next();
  String s[]=po.split("-",0);
  System.out.println((s.length==2)?(s[0].length()==a&&s[1].length()==b)?"Yes":"No":"No");
} main {
Scanner sc=new Scanner(System.in);
  int a=sc.nextInt();
  int b=sc.nextInt();
  String po=sc.next();
  String s[]=po.split("-",0);
  System.out.println((s.length==2)?(s[0].length()==a&&s[1].length()==b)?"Yes":"No":"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 po=sc.next(); po sc.next() sc.next sc String s[]=po.split("-",0); s po.split("-",0) po.split po "-" 0 System.out.println((s.length==2)?(s[0].length()==a&&s[1].length()==b)?"Yes":"No":"No") System.out.println System.out System System.out (s.length==2)?(s[0].length()==a&&s[1].length()==b)?"Yes":"No":"No" (s.length==2) s.length s s.length 2 (s[0].length()==a&&s[1].length()==b)?"Yes":"No" (s[0].length()==a&&s[1].length()==b) s[0].length()==a s[0].length() s[0].length s[0] s 0 a s[1].length()==b s[1].length() s[1].length s[1] s 1 b "Yes" "No" "No" 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 po=sc.next();
  String s[]=po.split("-",0);
  System.out.println((s.length==2)?(s[0].length()==a&&s[1].length()==b)?"Yes":"No":"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 po=sc.next();
  String s[]=po.split("-",0);
  System.out.println((s.length==2)?(s[0].length()==a&&s[1].length()==b)?"Yes":"No":"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 po=sc.next();
  String s[]=po.split("-",0);
  System.out.println((s.length==2)?(s[0].length()==a&&s[1].length()==b)?"Yes":"No":"No");
}}
