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