#include <bits/stdc++.h>
const long long INF = LLONG_MAX;
using namespace std;
using ll = long long;
using P = pair<int, int>;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
int main() {
  string s;
  int A, B;
  cin >> A >> B;
  cin >> s;
  if (s.size() != A + B + 1) {
    cout << "No" << endl;
    return 0;
  }
  int p = s.find('-');
  if (p != A) {
    cout << "No" << endl;
    return 0;
  }
  cout << "Yes" << endl;
  return 0;
}
