#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  string s;
  cin >> s;
  bool isp = true;
  for (int i = 0; i < a; i++) {
    if (s[i] < '0' || s[i] > '9') isp = false;
  }
  if (s[a] != '-') isp = false;
  for (int i = a + 1; i < b; i++) {
    if (s[i] < '0' || s[i] > '9') isp = false;
  }
  cout << (isp ? "Yes" : "No");
  return 0;
}
