#include <bits/stdc++.h>
using namespace std;
int main() {
  int nA, nB;
  cin >> nA >> nB;
  char strS[20];
  memset(strS, NULL, sizeof(strS));
  cin >> strS;
  char szTmpValA[20];
  memset(szTmpValA, NULL, sizeof(szTmpValA));
  strncpy(szTmpValA, strS, nA);
  char szTmpValB[20];
  memset(szTmpValB, NULL, sizeof(szTmpValB));
  strncpy(szTmpValB, &strS[nA + 2], nB);
  int nTotalLen = nA + nB + 1;
  if (strlen(strS) != nTotalLen) {
    cout << "No";
    return 0;
  }
  bool bErr = false;
  for (int i = 0; i < nTotalLen; i++) {
    if (i != nA) {
      if (0 == isdigit(strS[i])) {
        bErr = true;
        break;
      }
    } else {
      if ('-' != strS[i]) {
        bErr = true;
        break;
      }
    }
  }
  if (bErr)
    cout << "No";
  else
    cout << "Yes";
  return 0;
}
