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();
int h=0;
for(int i=0;i<S.length();i++){
    if(i==A){
    if(S.charAt(i)=='-')h++;
    }else {
        if(S.charAt(i)=='-'){
        h=0;break;
        }
    }
    
}
if(h==1){System.out.println("Yes");}else{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();
int h=0;
for(int i=0;i<S.length();i++){
    if(i==A){
    if(S.charAt(i)=='-')h++;
    }else {
        if(S.charAt(i)=='-'){
        h=0;break;
        }
    }
    
}
if(h==1){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();
String S=sc.next();
int h=0;
for(int i=0;i<S.length();i++){
    if(i==A){
    if(S.charAt(i)=='-')h++;
    }else {
        if(S.charAt(i)=='-'){
        h=0;break;
        }
    }
    
}
if(h==1){System.out.println("Yes");}else{System.out.println("No");}

} main {
Scanner sc = new Scanner(System.in);
int A=sc.nextInt();
int B=sc.nextInt();
String S=sc.next();
int h=0;
for(int i=0;i<S.length();i++){
    if(i==A){
    if(S.charAt(i)=='-')h++;
    }else {
        if(S.charAt(i)=='-'){
        h=0;break;
        }
    }
    
}
if(h==1){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 String S=sc.next(); S sc.next() sc.next sc int h=0; h 0 for(int i=0;i<S.length();i++){
    if(i==A){
    if(S.charAt(i)=='-')h++;
    }else {
        if(S.charAt(i)=='-'){
        h=0;break;
        }
    }
    
} int i=0; int i=0; i 0 i<S.length() i S.length() S.length S i++ i++ i {
    if(i==A){
    if(S.charAt(i)=='-')h++;
    }else {
        if(S.charAt(i)=='-'){
        h=0;break;
        }
    }
    
} {
    if(i==A){
    if(S.charAt(i)=='-')h++;
    }else {
        if(S.charAt(i)=='-'){
        h=0;break;
        }
    }
    
} if(i==A){
    if(S.charAt(i)=='-')h++;
    }else {
        if(S.charAt(i)=='-'){
        h=0;break;
        }
    } i==A i A {
    if(S.charAt(i)=='-')h++;
    } if(S.charAt(i)=='-')h++; S.charAt(i)=='-' S.charAt(i) S.charAt S i '-' h++ h {
        if(S.charAt(i)=='-'){
        h=0;break;
        }
    } if(S.charAt(i)=='-'){
        h=0;break;
        } S.charAt(i)=='-' S.charAt(i) S.charAt S i '-' {
        h=0;break;
        } h=0 h 0 break; if(h==1){System.out.println("Yes");}else{System.out.println("No");} h==1 h 1 {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();
String S=sc.next();
int h=0;
for(int i=0;i<S.length();i++){
    if(i==A){
    if(S.charAt(i)=='-')h++;
    }else {
        if(S.charAt(i)=='-'){
        h=0;break;
        }
    }
    
}
if(h==1){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();
String S=sc.next();
int h=0;
for(int i=0;i<S.length();i++){
    if(i==A){
    if(S.charAt(i)=='-')h++;
    }else {
        if(S.charAt(i)=='-'){
        h=0;break;
        }
    }
    
}
if(h==1){System.out.println("Yes");}else{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();
int h=0;
for(int i=0;i<S.length();i++){
    if(i==A){
    if(S.charAt(i)=='-')h++;
    }else {
        if(S.charAt(i)=='-'){
        h=0;break;
        }
    }
    
}
if(h==1){System.out.println("Yes");}else{System.out.println("No");}

}
}