#include <bits/stdc++.h>
using namespace std;
#define LL long long
#undef INT_MIN
#undef INT_MAX
#define INT_MIN -2147483648
#define INT_MAX 2147483647
#define LL_MIN -9223372036854775808
#define LL_MAX 9223372036854775807
#define segment_size 65536
int main(){
    int A,B;
    cin >> A >> B;
    string S;
    cin >> S;
    flg = true;
    for(int i=0; i<A; i++){
        if(S[i] == '-') flg = false;
    }
    if(S[A] != '-') flg = false;
    for(int i=A+1; i<B; i++){
        if(S[i] == '-') flg = false;
    }
    if(flg) cout << "Yes" << endl;
    else cout << "No" << endl;
    
    return 0;
}