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();
    String S = sc.next();
    char[]ss = S.toCharArray();

    int cou = 0;
    for(int i=0; i<a; i++) {
    	if(ss[i] == '-') {
    		cou++;
    	}
    }
    for(int i=a+1; i<a+b+1; i++) {
    	if(ss[i] == '-') {
    		cou++;
    	}
    }
    if(ss[a] == '-') {
    	if(cou==0) {
    		System.out.println("Yes");    
        }else{
            System.out.println("No");
        }
    }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();
    String S = sc.next();
    char[]ss = S.toCharArray();

    int cou = 0;
    for(int i=0; i<a; i++) {
    	if(ss[i] == '-') {
    		cou++;
    	}
    }
    for(int i=a+1; i<a+b+1; i++) {
    	if(ss[i] == '-') {
    		cou++;
    	}
    }
    if(ss[a] == '-') {
    	if(cou==0) {
    		System.out.println("Yes");    
        }else{
            System.out.println("No");
        }
    }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();
    String S = sc.next();
    char[]ss = S.toCharArray();

    int cou = 0;
    for(int i=0; i<a; i++) {
    	if(ss[i] == '-') {
    		cou++;
    	}
    }
    for(int i=a+1; i<a+b+1; i++) {
    	if(ss[i] == '-') {
    		cou++;
    	}
    }
    if(ss[a] == '-') {
    	if(cou==0) {
    		System.out.println("Yes");    
        }else{
            System.out.println("No");
        }
    }else{
        System.out.println("No");

    	}
    } main {
    
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    String S = sc.next();
    char[]ss = S.toCharArray();

    int cou = 0;
    for(int i=0; i<a; i++) {
    	if(ss[i] == '-') {
    		cou++;
    	}
    }
    for(int i=a+1; i<a+b+1; i++) {
    	if(ss[i] == '-') {
    		cou++;
    	}
    }
    if(ss[a] == '-') {
    	if(cou==0) {
    		System.out.println("Yes");    
        }else{
            System.out.println("No");
        }
    }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 String S = sc.next(); S sc.next() sc.next sc char[]ss = S.toCharArray(); ss S.toCharArray() S.toCharArray S int cou = 0; cou 0 for(int i=0; i<a; i++) {
    	if(ss[i] == '-') {
    		cou++;
    	}
    } int i=0; int i=0; i 0 i<a i a i++ i++ i {
    	if(ss[i] == '-') {
    		cou++;
    	}
    } {
    	if(ss[i] == '-') {
    		cou++;
    	}
    } if(ss[i] == '-') {
    		cou++;
    	} ss[i] == '-' ss[i] ss i '-' {
    		cou++;
    	} cou++ cou for(int i=a+1; i<a+b+1; i++) {
    	if(ss[i] == '-') {
    		cou++;
    	}
    } int i=a+1; int i=a+1; i a+1 a 1 i<a+b+1 i a+b+1 a+b+1 a b 1 i++ i++ i {
    	if(ss[i] == '-') {
    		cou++;
    	}
    } {
    	if(ss[i] == '-') {
    		cou++;
    	}
    } if(ss[i] == '-') {
    		cou++;
    	} ss[i] == '-' ss[i] ss i '-' {
    		cou++;
    	} cou++ cou if(ss[a] == '-') {
    	if(cou==0) {
    		System.out.println("Yes");    
        }else{
            System.out.println("No");
        }
    }else{
        System.out.println("No");

    	} ss[a] == '-' ss[a] ss a '-' {
    	if(cou==0) {
    		System.out.println("Yes");    
        }else{
            System.out.println("No");
        }
    } if(cou==0) {
    		System.out.println("Yes");    
        }else{
            System.out.println("No");
        } cou==0 cou 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" {
        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();
    String S = sc.next();
    char[]ss = S.toCharArray();

    int cou = 0;
    for(int i=0; i<a; i++) {
    	if(ss[i] == '-') {
    		cou++;
    	}
    }
    for(int i=a+1; i<a+b+1; i++) {
    	if(ss[i] == '-') {
    		cou++;
    	}
    }
    if(ss[a] == '-') {
    	if(cou==0) {
    		System.out.println("Yes");    
        }else{
            System.out.println("No");
        }
    }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();
    String S = sc.next();
    char[]ss = S.toCharArray();

    int cou = 0;
    for(int i=0; i<a; i++) {
    	if(ss[i] == '-') {
    		cou++;
    	}
    }
    for(int i=a+1; i<a+b+1; i++) {
    	if(ss[i] == '-') {
    		cou++;
    	}
    }
    if(ss[a] == '-') {
    	if(cou==0) {
    		System.out.println("Yes");    
        }else{
            System.out.println("No");
        }
    }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();
    String S = sc.next();
    char[]ss = S.toCharArray();

    int cou = 0;
    for(int i=0; i<a; i++) {
    	if(ss[i] == '-') {
    		cou++;
    	}
    }
    for(int i=a+1; i<a+b+1; i++) {
    	if(ss[i] == '-') {
    		cou++;
    	}
    }
    if(ss[a] == '-') {
    	if(cou==0) {
    		System.out.println("Yes");    
        }else{
            System.out.println("No");
        }
    }else{
        System.out.println("No");

    	}
    }
}
    
    