#include <bits/stdc++.h>
using namespace std;
const int INF = 1001001001;
const long long int LINF = 100100100100100100;
const double EPS = 1e-10;
const double PI = acos(-1.0);
template <typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val) {
  std::fill((T *)array, (T *)(array + N), val);
}
__attribute__((constructor)) void initial() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(15);
}
signed main() {
  int a, b;
  cin >> a >> b;
  string s;
  cin >> s;
  for (int i = 0; i < (int)(a); i++) {
    int k = s[i] - '0';
    cerr << k << endl;
    if (k < 0 || k > 9) return cout << "No" << endl, 0;
  }
  cerr << s[a] << endl;
  if (s[a] != '-') return cout << "No" << endl, 0;
  for (int i = 0; i < (int)(b); i++) {
    int k = s[i + a] - '0';
    if (k < 0 || k > 9) return cout << "No" << endl, 0;
  }
  cout << "Yes" << endl;
  return 0;
}
