import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        sc.nextLine();
        String c = sc.nextLine();

        int flag = 0;
        if(c.charAt(a) != '-'){
            flag++;
        }

        String d = c.substring(0,a);
        String e = c.substring(a+1,c.length());
        if(a != d.length() || b != e.length()){
            flag++;
            System.out.println(a);
            System.out.println(d.length());
            System.out.println(b);
            System.out.println(e.length());
        }
        int count =0;
        for(char x: c.toCharArray()){
            if(x == '-'){
                count++;
            }
        }
        if(count != 1){
            flag++;
        }
        if(flag == 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
} import java.util.Scanner; Scanner 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();
        sc.nextLine();
        String c = sc.nextLine();

        int flag = 0;
        if(c.charAt(a) != '-'){
            flag++;
        }

        String d = c.substring(0,a);
        String e = c.substring(a+1,c.length());
        if(a != d.length() || b != e.length()){
            flag++;
            System.out.println(a);
            System.out.println(d.length());
            System.out.println(b);
            System.out.println(e.length());
        }
        int count =0;
        for(char x: c.toCharArray()){
            if(x == '-'){
                count++;
            }
        }
        if(count != 1){
            flag++;
        }
        if(flag == 0){
            System.out.println("Yes");
        }else{
            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();
        sc.nextLine();
        String c = sc.nextLine();

        int flag = 0;
        if(c.charAt(a) != '-'){
            flag++;
        }

        String d = c.substring(0,a);
        String e = c.substring(a+1,c.length());
        if(a != d.length() || b != e.length()){
            flag++;
            System.out.println(a);
            System.out.println(d.length());
            System.out.println(b);
            System.out.println(e.length());
        }
        int count =0;
        for(char x: c.toCharArray()){
            if(x == '-'){
                count++;
            }
        }
        if(count != 1){
            flag++;
        }
        if(flag == 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        sc.nextLine();
        String c = sc.nextLine();

        int flag = 0;
        if(c.charAt(a) != '-'){
            flag++;
        }

        String d = c.substring(0,a);
        String e = c.substring(a+1,c.length());
        if(a != d.length() || b != e.length()){
            flag++;
            System.out.println(a);
            System.out.println(d.length());
            System.out.println(b);
            System.out.println(e.length());
        }
        int count =0;
        for(char x: c.toCharArray()){
            if(x == '-'){
                count++;
            }
        }
        if(count != 1){
            flag++;
        }
        if(flag == 0){
            System.out.println("Yes");
        }else{
            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 sc.nextLine() sc.nextLine sc String c = sc.nextLine(); c sc.nextLine() sc.nextLine sc int flag = 0; flag 0 if(c.charAt(a) != '-'){
            flag++;
        } c.charAt(a) != '-' c.charAt(a) c.charAt c a '-' {
            flag++;
        } flag++ flag String d = c.substring(0,a); d c.substring(0,a) c.substring c 0 a String e = c.substring(a+1,c.length()); e c.substring(a+1,c.length()) c.substring c a+1 a 1 c.length() c.length c if(a != d.length() || b != e.length()){
            flag++;
            System.out.println(a);
            System.out.println(d.length());
            System.out.println(b);
            System.out.println(e.length());
        } a != d.length() || b != e.length() a != d.length() a d.length() d.length d b != e.length() b e.length() e.length e {
            flag++;
            System.out.println(a);
            System.out.println(d.length());
            System.out.println(b);
            System.out.println(e.length());
        } flag++ flag System.out.println(a) System.out.println System.out System System.out a System.out.println(d.length()) System.out.println System.out System System.out d.length() d.length d System.out.println(b) System.out.println System.out System System.out b System.out.println(e.length()) System.out.println System.out System System.out e.length() e.length e int count =0; count 0 for(char x: c.toCharArray()){
            if(x == '-'){
                count++;
            }
        } char x c.toCharArray() c.toCharArray c {
            if(x == '-'){
                count++;
            }
        } {
            if(x == '-'){
                count++;
            }
        } if(x == '-'){
                count++;
            } x == '-' x '-' {
                count++;
            } count++ count if(count != 1){
            flag++;
        } count != 1 count 1 {
            flag++;
        } flag++ flag if(flag == 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        } flag == 0 flag 0 {
            System.out.println("Yes");
        } System.out.println("Yes") System.out.println System.out System System.out "Yes" {
            System.out.println("No");
        } System.out.println("No") System.out.println System.out System System.out "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();
        sc.nextLine();
        String c = sc.nextLine();

        int flag = 0;
        if(c.charAt(a) != '-'){
            flag++;
        }

        String d = c.substring(0,a);
        String e = c.substring(a+1,c.length());
        if(a != d.length() || b != e.length()){
            flag++;
            System.out.println(a);
            System.out.println(d.length());
            System.out.println(b);
            System.out.println(e.length());
        }
        int count =0;
        for(char x: c.toCharArray()){
            if(x == '-'){
                count++;
            }
        }
        if(count != 1){
            flag++;
        }
        if(flag == 0){
            System.out.println("Yes");
        }else{
            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();
        sc.nextLine();
        String c = sc.nextLine();

        int flag = 0;
        if(c.charAt(a) != '-'){
            flag++;
        }

        String d = c.substring(0,a);
        String e = c.substring(a+1,c.length());
        if(a != d.length() || b != e.length()){
            flag++;
            System.out.println(a);
            System.out.println(d.length());
            System.out.println(b);
            System.out.println(e.length());
        }
        int count =0;
        for(char x: c.toCharArray()){
            if(x == '-'){
                count++;
            }
        }
        if(count != 1){
            flag++;
        }
        if(flag == 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
} Main
import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        sc.nextLine();
        String c = sc.nextLine();

        int flag = 0;
        if(c.charAt(a) != '-'){
            flag++;
        }

        String d = c.substring(0,a);
        String e = c.substring(a+1,c.length());
        if(a != d.length() || b != e.length()){
            flag++;
            System.out.println(a);
            System.out.println(d.length());
            System.out.println(b);
            System.out.println(e.length());
        }
        int count =0;
        for(char x: c.toCharArray()){
            if(x == '-'){
                count++;
            }
        }
        if(count != 1){
            flag++;
        }
        if(flag == 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
}