#include <bits/stdc++.h>
using namespace std;
 
int main(){
    int A, B;
    cin >> A >> B;

    char S[A+B+1];
    for (int i = 0; i < A+B+1; i++){
        cin >> S[i];
    }

    int count = 0;
    for (int i = 0; i < A + B + 1; i++){
        if ( i < A && !('0' <= S[i] && S[i] <= '9') ){
            count++;
        }
        else if (S[A] != '-'){
            cout++;
        }
        else if ( A+1 <= i && i < A+B+1 && !('0' <= S[i] && S[i] <= '9')){
            count++;
        }
    }

    if (count > 0){
        cout << "No" << endl;
    }
    else {
        cout << "Yes" << endl;
    }
}