#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
const int INF = 1000000007;
using namespace std;
using Graph = vector<vector<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;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
bool is_prime(long long n) {
  for (int64_t i = 2; i * i <= n; i++) {
    if (n % i == 0) return false;
  }
  return true;
}
bool check_int(char c) {
  if ('0' <= c && c <= '9')
    return true;
  else
    return false;
}
int solve() {
  int a, b;
  cin >> a >> b;
  bool ans = true;
  string s;
  cin >> s;
  for (int i = 0; i < (a); ++i) {
    if (!check_int(s[i])) ans = false;
  }
  if (s[a] != '-') ans = false;
  for (int i = a - 1; i < (b); ++i) {
    if (!check_int(s[i])) ans = false;
  }
  cout << (ans ? "Yes" : "No") << endl;
  return 0;
}
int main() {
  solve();
  return 0;
}
