#include <bits/stdc++.h>
using namespace std;
template <typename T>
T gcd(T a, T b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
template <typename T>
T power(T x, T y, long long int m = 1000000007) {
  T ans = 1;
  while (y > 0) {
    if (y & 1LL) ans = (ans * x) % m;
    y >>= 1LL;
    x = (x * x) % m;
  }
  return ans % m;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int a, b;
  cin >> a >> b;
  string s;
  cin >> s;
  if (s[a] != '-')
    cout << "No";
  else {
    bool p = true;
    for (int i = 0; s[i] != '\0'; i++) {
      if (s[i] == '-' && i != a) {
        p = false;
        break;
      } else if (s[i] < 48 || s[i] > 57) {
        p = false;
        break;
      }
    }
    if (p)
      cout << "Yes";
    else
      cout << "No";
  }
  return 0;
}
