#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
void ans(bool b, ostream& out = cout) { out << (b ? "Yes" : "No") << endl; }
void ans2(bool b, ostream& out = cout) { out << (b ? "YES" : "NO") << endl; }
template <typename T>
inline bool chmax(T& a, T b) {
  if (a < b) a = b;
  return a < b;
}
template <typename T>
inline bool chmin(T& a, T b) {
  if (b < a) a = b;
  return b < a;
}
template <typename A, size_t N, typename T>
void Fill(A (&array)[N], const T& val) {
  fill((T*)array, (T*)(array + N), val);
}
int dx[] = {1, 0, -1, 0, 1, -1, 1, -1};
int dy[] = {0, 1, 0, -1, 1, -1, -1, 1};
class debug {
 public:
  template <typename T>
  void vdeb(T vec);
  template <typename T1, typename T2>
  void adeb(T1* arr, T2 n);
  template <typename T>
  void mdeb(T mp);
};
template <typename T>
void debug::vdeb(T vec) {
  cout << "#vector set debug" << endl;
  for (auto vv : vec) cout << vv << " ";
  cout << endl;
}
template <typename T1, typename T2>
void debug::adeb(T1* arr, T2 n) {
  cout << "#adebug" << endl;
  for (int i = 0; i <= n; i++) cout << arr[i] << " ";
  cout << endl;
}
template <typename T>
void debug::mdeb(T mp) {
  cout << "#map pair debug" << endl;
  for (auto const& m : mp) cout << m.first << " " << m.second << endl;
}
debug dbg;
class BPostalCode {
 public:
  void solve(std::istream& in, std::ostream& out) {
    int a, b;
    in >> a >> b;
    string s;
    in >> s;
    bool res = true;
    for (int i = 0; i < a; i++) {
      if (s[i] < '0' || '9' < s[i]) res = false;
    }
    if (s[a] != '-') res = false;
    for (int i = a + 1; i <= b; i++) {
      if (s[i] < '0' || '9' < s[i]) res = false;
    }
    ans(res, out);
  }
};
int main() {
  BPostalCode solver;
  std::istream& in(std::cin);
  std::ostream& out(std::cout);
  solver.solve(in, out);
  return 0;
}
