#include<bits/stdc++.h>
using namespace std;
int main(){
    int a,b,e=0;
    cin>>a>>b;
    char c[a+b+1];
    for(int i=0;i<a+b+1;i++) cin>>c[i];
    for(int i=0;i<a+b+1;i++){
    if(c[i]>='0'&&c[i]<='9') e++;
    }
    if(a+b==e&&c[a]=='-') cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
}
