#include<bits/stdc++.h>

using namespace std;

int main()
{
  int A, B;
  string S;

  cin >> A >> B;
  cin >> S;

  if(S.find('-') == A && count(begin(S), end(S), '-') == 1) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}