#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<functional>
using namespace std;
#define REP(i,m,n) for(int i=(int)m ; i < (int) n ; ++i )
#define rep(i,n) REP(i,0,n)
typedef long long ll;
typedef pair<int,int> pint;
typedef pair<ll,int> pli;
const int inf=1e9+7;
const ll longinf=1LL<<60 ;
const ll mod=1e9+7 ;
#define SIZE_OF_ARRAY(a) (sizeof(a)/sizeof(a[0]))



int main(){
    //int ans;
    cin.tie(0);
    ios::sync_with_stdio(false);
    int N;
    cin >> N;
    int M;
    cin >> M;
    string S;
    cin >> S;
    int a[N];
    int b[M];
    for(int i = 0;i < N;i++){
    a[i] = S.at(i) - 48;
   // cout << a[i] << endl;
    }
    char C;
    C = S.at(N);
    //cout << C << endl;
    for(int i = 0;i < M;i++){
        b[i] = S.at(N + 1 + i) - 48;
      //  cout << b[i] << endl;
    }
    string ans = "No";
    if(C != '-' || a[i] < 0 || b[i] < 0)
        goto solve;
    for(int i = 0;i < N;i++){
        if(a[i] - 10 <= 0){
            ans = "Yes";
        }else{
            ans = "No";
            goto solve;
        }
    }
    for(int i = 0;i < M;i++){
        if(b[i] - 10 <= 0){
            ans = "Yes";
        }else{
            ans = "No";
            goto solve;
        }
    }
    solve :
    cout << ans << endl;
}
