#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int A,B;
  string S;
  cin >> A >> B >> S;
  int count=0;
  for (int i=0;i<A+B+1;i++){
    if (S[i]=='-'){
      count++;
    }
  }
  if (count==1&&S[A]=='-'){
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}