#include <bits/stdc++.h>
using uint = unsigned int;
using ll = long long;
enum : int { M = (int)1e9 + 7 };
enum : ll { MLL = (ll)1e18L + 9 };
using namespace std;
template <ostream& out = cout, class... T>
void prints(T&&...) {}
template <ostream& out = cout, class... T>
void printe(T&&...) {}
template <ostream& out = cout, class... T>
void printw(T&&...) {}
template <ostream& out = cout, class... T>
void printew(T&&...) {}
template <ostream& out = cout, class... T>
void printb(T&&...) {}
template <ostream& out = cout, class... T>
void printd(T&&...) {}
template <ostream& out = cout, class... T>
void printde(T&&...){};
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int a, b;
  cin >> a >> b;
  string s;
  cin >> s;
  bool ok = true;
  for (int i = 0; i < a; i++) {
    if (!isdigit(s[i])) {
      ok = false;
    }
  }
  if (s[a] != '-') {
    ok = false;
  }
  for (int i = 0; i < b; i++) {
    if (!isdigit(s[a + 1 + i])) {
      ok = false;
    }
  }
  cout << (ok ? "Yes" : "No") << '\n';
}
