#include <bits/stdc++.h>
using namespace std;
void print(vector<int> &b);
void print(vector<int> &b) {
  for (auto i : b) {
    cout << i << " ";
  }
  cout << endl;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int a, b;
  string s;
  cin >> a >> b >> s;
  if (s[a + 1] != '-') {
    cout << "No";
    return 0;
  }
  for (int i = 0; i < a + 1 + b; ++i) {
    if (i != a + 1) {
      if (s[i] > '9' || s[i] < '0') {
        cout << "No";
        return 0;
      }
    }
  }
  cout << "Yes";
  return 0;
}
