#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e+9 + 7;
long long n, m, l;
string s, t;
long long d[200010], dp[550][550];
int main() {
  cin >> n >> m >> s;
  t = "Yes";
  for (long long i = (0); i < (n); i++)
    if (s[i] == '-') t = "No";
  if (s[n] != '-') t = "No";
  for (long long i = (n + 1); i < (m); i++)
    if (s[i] == '-') t = "No";
  cout << (t) << endl;
  return 0;
}
