#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const long long OO = (long long)1e18;
const int dx[] = {0, 1, -1, 0};
const int dy[] = {1, 0, 0, -1};
long long gcd(long long a, long long b) {
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
long long fast_power(double base, long long power) {
  if (power == 1) return base;
  if (power % 2 == 0)
    return fast_power((base * base), power / 2);
  else
    return (base * fast_power((base * base), power / 2));
}
void Qalbaz() {}
vector<long long> vec;
long long dp[100001];
long long solve(int i) {
  if (i <= 0) return 0;
  long long &ret = dp[i];
  if (ret != -1) return ret;
  ret = max(ret, max(solve(i - 1), solve(i - 2) + vec[i] * i));
  return ret;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  string str;
  cin >> str;
  int ans = n + m + 1;
  if (str.size() != ans) {
    cout << "NO";
    return 0;
  }
  if (str[n] != '-') {
    cout << "NO";
    return 0;
  }
  for (int i = 0; i < n; i++) {
    if (str[i] >= '0' && str[i] <= '9') continue;
    cout << "NO";
    return 0;
  }
  for (int i = n + 1; i < str.size(); i++) {
    if (str[i] >= '0' && str[i] <= '9') continue;
    cout << "NO";
    return 0;
  }
  cout << "YES";
  return 0;
}
