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