#include <bits/stdc++.h>
using namespace std;
using vint = vector<int>;
using ll = long long;
using vll = vector<ll>;
template <class T>
void chmin(T& a, const T& b) {
  a = min(a, b);
}
template <class T>
void chmax(T& a, const T& b) {
  a = max(a, b);
}
int main() {
  int a, b;
  cin >> a >> b;
  string s;
  cin >> s;
  if (s[a] != '-') {
    cout << "No" << endl;
    return 0;
  }
  for (int i = (0); i < (a); ++i)
    if (!isdigit(s[i])) {
      cout << "No" << endl;
      return 0;
    }
  for (int i = (a + 1); i < (b); ++i)
    if (!isdigit(s[i])) {
      cout << "No" << endl;
      return 0;
    }
  cout << "Yes" << endl;
  return 0;
}
