import java.util.*;
class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt(),b=sc.nextInt();
        char[] s = sc.next().toCharArray();
        String ans = "Yes";
        for(int i = 0;i<s.length;i++){
            if(i!=a&&s[i]=='-'){
                ans = "No";
                break;
            } else if(i==a&&s[i]!='-'){
                ans = "No";
                break;
            }
        }
        System.out.println(ans);
    }
} import java.util.*; util.* java class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt(),b=sc.nextInt();
        char[] s = sc.next().toCharArray();
        String ans = "Yes";
        for(int i = 0;i<s.length;i++){
            if(i!=a&&s[i]=='-'){
                ans = "No";
                break;
            } else if(i==a&&s[i]!='-'){
                ans = "No";
                break;
            }
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt(),b=sc.nextInt();
        char[] s = sc.next().toCharArray();
        String ans = "Yes";
        for(int i = 0;i<s.length;i++){
            if(i!=a&&s[i]=='-'){
                ans = "No";
                break;
            } else if(i==a&&s[i]!='-'){
                ans = "No";
                break;
            }
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt(),b=sc.nextInt();
        char[] s = sc.next().toCharArray();
        String ans = "Yes";
        for(int i = 0;i<s.length;i++){
            if(i!=a&&s[i]=='-'){
                ans = "No";
                break;
            } else if(i==a&&s[i]!='-'){
                ans = "No";
                break;
            }
        }
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt() a sc.nextInt() sc.nextInt sc b=sc.nextInt(); b sc.nextInt() sc.nextInt sc char[] s = sc.next().toCharArray(); s sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc String ans = "Yes"; ans "Yes" for(int i = 0;i<s.length;i++){
            if(i!=a&&s[i]=='-'){
                ans = "No";
                break;
            } else if(i==a&&s[i]!='-'){
                ans = "No";
                break;
            }
        } int i = 0; int i = 0; i 0 i<s.length i s.length s s.length i++ i++ i {
            if(i!=a&&s[i]=='-'){
                ans = "No";
                break;
            } else if(i==a&&s[i]!='-'){
                ans = "No";
                break;
            }
        } {
            if(i!=a&&s[i]=='-'){
                ans = "No";
                break;
            } else if(i==a&&s[i]!='-'){
                ans = "No";
                break;
            }
        } if(i!=a&&s[i]=='-'){
                ans = "No";
                break;
            } else if(i==a&&s[i]!='-'){
                ans = "No";
                break;
            } i!=a&&s[i]=='-' i!=a i a s[i]=='-' s[i] s i '-' {
                ans = "No";
                break;
            } ans = "No" ans "No" break; if(i==a&&s[i]!='-'){
                ans = "No";
                break;
            } i==a&&s[i]!='-' i==a i a s[i]!='-' s[i] s i '-' {
                ans = "No";
                break;
            } ans = "No" ans "No" break; System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.*;
class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt(),b=sc.nextInt();
        char[] s = sc.next().toCharArray();
        String ans = "Yes";
        for(int i = 0;i<s.length;i++){
            if(i!=a&&s[i]=='-'){
                ans = "No";
                break;
            } else if(i==a&&s[i]!='-'){
                ans = "No";
                break;
            }
        }
        System.out.println(ans);
    }
}