#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const double pi = acos(-1);
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  for (ll i = (0), __last_i = (v.size()); i < __last_i; i++) {
    if (i) os << " ";
    os << v[i];
  }
  return os;
}
template <typename T>
ostream& operator<<(ostream& os, const vector<vector<T>>& v) {
  for (ll i = (0), __last_i = (v.size()); i < __last_i; i++) {
    if (i) os << endl;
    os << v[i];
  }
  return os;
}
bool check(char a) {
  bool isans = false;
  std::vector<char> v = {'1', '2', '3', '4', '5', '6', '7', '8', '9', '0'};
  for (int i = 0; i < 10; ++i) {
    if (a == v[i]) isans = true;
  }
  return isans;
}
int main() {
  int a, b;
  cin >> a >> b;
  string s;
  cin >> s;
  bool isAns = true;
  for (int i = 0; i < a; ++i) {
    if (!check(s[i])) isAns = false;
  }
  if (s[a] != '-') isAns = false;
  for (int i = a + 1; i < b; ++i) {
    if (!check(s[i])) isAns = false;
  }
  if (isAns)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
