#include <bits/stdc++.h>
using namespace std;
const long long int MOD = 1e9 + 7;
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << endl;
  err(++it, args...);
}
vector<vector<int>> adj;
vector<bool> vis;
vector<int> color;
vector<long long int> lprime(10e5 + 2);
template <class T>
T maxx(T a, T b) {
  return a > b ? a : b;
}
template <typename T, typename... Args>
T maxx(T a, T b, Args... args) {
  return maxx(a > b ? a : b, args...);
}
long long int mexp(long long int x, long long int n, unsigned long long int m) {
  long long int res = 1;
  while (n) {
    if (n & 1) res = (res * x) % m;
    n >>= 1;
    x = ((x % m) * (x % m)) % m;
  }
  return res;
}
double pow(double a, int n) {
  if (n == 0) return 1;
  if (n == 1) return a;
  double t = pow(a, n / 2);
  return t * t * pow(a, n % 2);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout << fixed;
  cerr << fixed;
  cout << setprecision(10);
  cerr << setprecision(3);
  long long int a, b;
  cin >> a >> b;
  char c;
  for (int i = 0; i < a + b + 1; ++i) {
    cin >> c;
    if ((i == a && c != '-') && !(isdigit(c))) {
      cout << "No\n";
      return 0;
    }
  }
  cout << "Yes\n";
  return 0;
}
