// Example program
#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i = a; i < b; i++)
typedef long long ll;
typedef vector<ll> vi;
typedef pair<ll,ll> ii;
typedef vector<ii> vii;


int main() {
    int n,m;
    cin >> n >> m;
    string s;
    cin >> s.size();
    int flag = 1;
    if(s.size() != n+m+1) {
        flag = 0;
    } else {
        if(s[n] != '-') flag = 0;
        else {
            rep(i,0,s.size()) {
                if(i == n) continue;
                int num = s[i]-'0';
                if(num < 0 || num > 9) flag = 0;
            }    
        }
    }
    if(flag) cout << "YES" << endl;
    else cout << "NO" << endl;
    return 0;
}
