#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using Graph = vector<vector<ll>>;
constexpr int INF = 0x3f3f3f3f;
const long long mod = 1e9 + 7;
const long double PI = acos(-1);
int main() {
  int a, b, flag = 0;
  cin >> a >> b;
  string s;
  cin >> s;
  for (ll i = 0; i < a; i++) {
    if (!(s[i] >= '0' && s[i] <= '9')) flag++;
  }
  if (s[a] != '-') flag++;
  for (ll i = a + 1; i < s.length(); i++) {
    if (!(s[i] >= '0' && s[i] <= '9')) flag++;
  }
  if (flag == 0)
    puts("Yes");
  else
    puts("No");
  return 0;
}
