#include <bits/stdc++.h>
using namespace std;
const int EPS = 1e-9;
string s;
bool check(int cnt) {
  ;
  if (s[cnt] - '0' < 0 || s[cnt] - '0' > 9) return false;
  return true;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int a, b;
  while (cin >> a >> b >> s) {
    int cnt = 0;
    bool ans = true;
    while (cnt < a) {
      ans = ans & check(cnt);
      cnt++;
    }
    if (s[cnt] != '-') ans = false;
    cnt = 0;
    while (cnt < b) {
      ans = ans & check(cnt);
      cnt++;
    }
    if (s.size() != a + b + 1) ans = false;
    if (ans)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
  return 0;
}
