#include <bits/stdc++.h>
int gcd(int a, int b) {
  int c;
  while (b != 0) {
    c = a % b;
    a = b;
    b = c;
  }
  return a;
}
int lcm(int a, int b) {
  int c = gcd(a, b);
  a /= c;
  return a * b;
}
const int MOD = 1000000007;
const int INF = 1e9;
const long long LINF = INF * 1ll * INF;
const long double DINF = 1e200;
const double EPS = 1e-10;
const double PI = acos(-1.0);
using namespace std;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int a, b;
  string s;
  cin >> a >> b >> s;
  for (int i = 0; i < a; i++) {
    if (s[i] == '-') {
      cout << "NO" << endl;
      return 0;
    }
  }
  for (int i = a + 1; i < s.size(); i++) {
    if (s[i] == '-') {
      cout << "NO" << endl;
      return 0;
    }
  }
  if (s[a] != '-') {
    cout << "NO" << endl;
    return 0;
  }
  cout << "YES" << endl;
  return 0;
}
