#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n, a = 0, m;
  string s;
  cin >> n >> m >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '-') {
      a = i;
      break;
    }
  }
  if (a == n && (s.size() - (a + 1) == m)) {
    cout << "Yes"
         << "\n";
    return 0;
  }
  cout << "No"
       << "\n";
  return 0;
}
