#include <bits/stdc++.h>
using namespace std;
const int mxN = 2e5;
const long double pi = 4.0 * atanl(1.0);
const int iinf = 1e9 + 10;
const int inf = 1e18 + iinf + 10;
const int mod = 1000000007;
const long double prec = .000001;
int n, m, t, a[mxN];
vector<int> v;
void fast() { ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); }
int main() {
  fast();
  cin >> n >> m;
  string s;
  cin >> s;
  string ans = "Yes";
  int c = 0;
  for (int i = 0; i < s.length(); ++i) {
    if (i == n && s[i] != '-') ans = "No";
    if (i > n && isdigit(s[i]) == false) ans = "No";
    if (i > n) ++c;
  }
  if (c < 3) ans = "No";
  cout << ans;
  return 0;
}
