#include <bits/stdc++.h>
using namespace std;
struct Edge {
  int from, to, cost;
  bool operator<(Edge e) { return cost < e.cost; }
};
template <class T>
using vec = vector<T>;
template <class T>
using pql = priority_queue<T, vector<T>, greater<T>>;
string debug_show(pair<int, int> a) {
  return "(" + to_string(a.first) + "," + to_string(a.second) + ")";
}
template <class T>
struct augEdge {
  T from, to;
  int cost;
  bool operator<(augEdge e) { return cost < e.cost; }
  bool operator>(augEdge e) { return cost > e.cost; }
};
template <class T>
using augGraph = vector<augEdge<T>>;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int a, b;
  cin >> a >> b;
  string s;
  cin >> s;
  for (int i = (int)(0); i < (int)(a); i++) {
    if (s[i] == '-') {
      cout << "No" << endl;
      return 0;
    }
  }
  if (s[a] != '-') {
    cout << "No" << endl;
    return 0;
  }
  for (int i = (int)(a + 1); i < (int)(b); i++) {
    if (s[i] == '-') {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
  return 0;
}
