#include <bits/stdc++.h>
using namespace std;


int main()
{
  int a,b;
  string s;
  cin >> a >> b;
  cin >> s;
  int flag = 1;
  int left = 0;
  int right = -1;
  int count = 0;
  for(int i = 0;i < s.size();i++){
    if(s[i] == '-'){
      flag = 2;
      cout++;
    }
    if(flag == 1) left++;
    else if(flag == 2) right++;
  }

  if(left == a && right == b && count == 1) cout << "Yes" << endl;
  else cout << "No" << endl;
  return 0;
}
