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