#include<iostream>
#include<algorithm>
#include<math.h>
#include<cstdio>
#include<ctype.h>
#include<stdio.h>
#include<set>
#include<vector>
#include<map>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<numeric>
#include<string>
typedef long long ll;
using namespace std;

ll gcd(ll a, ll b){
if(a<b){return gcd(b,a);}
else if(a%b){return gcd(b,a%b);}
else{return b;}
}
int main(){
  ll A,B;
  cin>>A>>B;
  string S;
  cin>>S;
  ll a=0;
  for (int i = 0; i < S.size(); i++){
  if (S[i] == '1') {a++;}
  }
  if(a==1&&S[A]=='-')
  cout<<"Yes"<<endl;
  else
  cout<<"No"<<endl;
}

}
