#include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
#include<cstdio>
#include<bits/stdc++.h>
using namespace std;
using ll =long long;

int main (void) {
  int A,B;
  char s;
  cin>> A>> B;
  for (int i=0;i<A+B+1;i++){
    cin >> s;
    if (i==A){
      if(s=="-"){
        continue;
      }
      else {
        cout << "No";
        return 0;
      }
    }
    if (s=="-"){
      cout << "No";
      return 0;
    }
  }
  cout << "Yes";
}