#include <bits/stdc++.h>
using namespace std;
const int64_t mod = 1e9 + 7;
void dbg() { cerr << "\n"; }
template <typename T, typename... T2>
void dbg(const T& fst, const T2&... rst) {
  cerr << fst << ": ";
  dbg(rst...);
}
int main() {
  int a, b;
  string s;
  cin >> a >> b >> s;
  int ok = 1;
  if ((int)(s).size() != a + b + 1) {
    ok = 0;
    puts("No");
    return 0;
  }
  for (int(i) = 0; (i) < (a); (i)++)
    if (!isdigit(s[i])) ok = 0;
  if (s[a] != '-') ok = 0;
  for (int(i) = (a + 1); (i) < (b); (i)++)
    if (!isdigit(s[i])) ok = 0;
  cout << (ok ? "Yes" : "No") << "\n";
  return 0;
}
