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