#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  char s[12];
  bool flag = true;
  cin >> a >> b;
  cin >> s;
  for (int i = 0; i < a; i++) {
    if (s[i] == '-') {
      flag = false;
      break;
    }
  }
  if (s[a] != '-') flag = false;
  for (int i = a + 1; i < a + b + 1; i++) {
    if (s[i] == '-') {
      flag == false;
      break;
    }
  }
  if (flag)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
