#include <bits/stdc++.h>
using namespace std;
long long int power(int a, int b) {
  if (b == 0) return 1;
  long long int k = power(a, b / 2);
  if (b % 2 == 0)
    return ((k % 1000000007) * (k % 1000000007)) % 1000000007;
  else
    return ((k % 1000000007) * (k % 1000000007) * (a % 1000000007)) %
           1000000007;
}
long long int fact(long long int n) {
  if (n == 1 || n == 0)
    return 1;
  else
    return ((n % 1000000007) * (fact(n - 1) % 1000000007)) % 1000000007;
}
int div(int n) {
  int c = 0;
  for (int i = 1; i <= sqrt(n); i++) {
    if (n % i == 0) {
      if (n / i == i)
        c++;
      else
        c += 2;
    }
  }
  return c;
}
int func(int n) { return (n * (n + 1)) / 2; }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int a, b;
  cin >> a >> b;
  string str;
  cin >> str;
  for (int i = 0; i < str.length(); i++) {
    if (str[a] != '-') {
      cout << "No";
      return 0;
    } else if (str[i] < '0' || str[i] > '9') {
      cout << "No";
      return 0;
    }
  }
  cout << "Yes";
  return 0;
}
