#include <bits/stdc++.h>
using namespace std;

int main(){
  int a,b,i;cin>>a>>b;char c;bool f=1;
  for(i=0;i<a+b+1;i++){
    cin>>c;
    if((i<a&&c=='-')||(i==a&&c!='-')||(i>a&&c=='-')) f=0;
  }
  cout<<(f?"Yes":"No");
}