#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long int a, b, i, j, flag = 0;
  cin >> a >> b;
  char s[a + b + 1];
  for (i = 0; i < a + b + 1; i++) {
    cin >> s[i];
    if (i < a && (s[i] <= 48 && s[i] >= 58))
      flag = 1;
    else if (i == a && s[i] != '-')
      flag = 1;
    else if ((i > a && i < b) && (s[i] <= 48 && s[i] >= 58))
      flag = 1;
  }
  if (flag == 1)
    cout << "No\n";
  else
    cout << "Yes\n";
  return 0;
}
