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 str = sc.next();
        if(str.charAt(a) != '-') {
          System.out.println("No");
          return;
        }
        if(!isValid(str.substring(0, a), a) || !isValid(str.substring(a+1), b)) {
          System.out.println("No");
          return;
        }
        System.out.println("Yes");
    }

    private static boolean isValid(String str, int len) {
      if(str.length() != len) return false;
      for(char c : str.toCharArray()) {
        if(!Character.isDigit(c)) return false;
      }
      return true;
    }
} 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 str = sc.next();
        if(str.charAt(a) != '-') {
          System.out.println("No");
          return;
        }
        if(!isValid(str.substring(0, a), a) || !isValid(str.substring(a+1), b)) {
          System.out.println("No");
          return;
        }
        System.out.println("Yes");
    }

    private static boolean isValid(String str, int len) {
      if(str.length() != len) return false;
      for(char c : str.toCharArray()) {
        if(!Character.isDigit(c)) return false;
      }
      return true;
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String str = sc.next();
        if(str.charAt(a) != '-') {
          System.out.println("No");
          return;
        }
        if(!isValid(str.substring(0, a), a) || !isValid(str.substring(a+1), b)) {
          System.out.println("No");
          return;
        }
        System.out.println("Yes");
    } main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String str = sc.next();
        if(str.charAt(a) != '-') {
          System.out.println("No");
          return;
        }
        if(!isValid(str.substring(0, a), a) || !isValid(str.substring(a+1), b)) {
          System.out.println("No");
          return;
        }
        System.out.println("Yes");
    } 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 str = sc.next(); str sc.next() sc.next sc 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; if(!isValid(str.substring(0, a), a) || !isValid(str.substring(a+1), b)) {
          System.out.println("No");
          return;
        } !isValid(str.substring(0, a), a) || !isValid(str.substring(a+1), b) !isValid(str.substring(0, a), a) isValid(str.substring(0, a), a) isValid str.substring(0, a) str.substring str 0 a a !isValid(str.substring(a+1), b) isValid(str.substring(a+1), b) isValid str.substring(a+1) str.substring str a+1 a 1 b {
          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 private static boolean isValid(String str, int len) {
      if(str.length() != len) return false;
      for(char c : str.toCharArray()) {
        if(!Character.isDigit(c)) return false;
      }
      return true;
    } isValid {
      if(str.length() != len) return false;
      for(char c : str.toCharArray()) {
        if(!Character.isDigit(c)) return false;
      }
      return true;
    } if(str.length() != len) return false; str.length() != len str.length() str.length str len return false; false for(char c : str.toCharArray()) {
        if(!Character.isDigit(c)) return false;
      } char c str.toCharArray() str.toCharArray str {
        if(!Character.isDigit(c)) return false;
      } {
        if(!Character.isDigit(c)) return false;
      } if(!Character.isDigit(c)) return false; !Character.isDigit(c) Character.isDigit(c) Character.isDigit Character c return false; false return true; true String str str int len len public class Main { 
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String str = sc.next();
        if(str.charAt(a) != '-') {
          System.out.println("No");
          return;
        }
        if(!isValid(str.substring(0, a), a) || !isValid(str.substring(a+1), b)) {
          System.out.println("No");
          return;
        }
        System.out.println("Yes");
    }

    private static boolean isValid(String str, int len) {
      if(str.length() != len) return false;
      for(char c : str.toCharArray()) {
        if(!Character.isDigit(c)) return false;
      }
      return true;
    }
} public class Main { 
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String str = sc.next();
        if(str.charAt(a) != '-') {
          System.out.println("No");
          return;
        }
        if(!isValid(str.substring(0, a), a) || !isValid(str.substring(a+1), b)) {
          System.out.println("No");
          return;
        }
        System.out.println("Yes");
    }

    private static boolean isValid(String str, int len) {
      if(str.length() != len) return false;
      for(char c : str.toCharArray()) {
        if(!Character.isDigit(c)) return false;
      }
      return true;
    }
} 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 str = sc.next();
        if(str.charAt(a) != '-') {
          System.out.println("No");
          return;
        }
        if(!isValid(str.substring(0, a), a) || !isValid(str.substring(a+1), b)) {
          System.out.println("No");
          return;
        }
        System.out.println("Yes");
    }

    private static boolean isValid(String str, int len) {
      if(str.length() != len) return false;
      for(char c : str.toCharArray()) {
        if(!Character.isDigit(c)) return false;
      }
      return true;
    }
}