#include <bits/stdc++.h>
using namespace std;
bool is_num(char input) {
  std::vector<char> num_vec = {'0', '1', '2', '3', '4',
                               '5', '6', '7', '8', '9'};
  for (int i = 0; i < 10; i++) {
    if (input == num_vec[i]) {
      return true;
    }
  }
  return false;
}
int main() {
  int a, b;
  string s;
  cin >> a >> b;
  cin >> s;
  cout << s[0] << endl;
  for (int i = 0; i < a; i++) {
    if (!is_num(s[i])) {
      cout << "No" << endl;
      return 0;
    }
  }
  if (s[a] != '-') {
    cout << "No" << endl;
    return 0;
  }
  for (int i = a + 1; i < a + b + 1; i++) {
    if (!is_num(s[i])) {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
  return 0;
}
