#include<stdio.h>
int main(){
	int A, B;
	int mark =0;
	scanf("%d %d", &A, &B);
	char in[A+B+1];
	scanf("%s", in);
	int ctr = 0;
	for(int i = 0; i < A+B+1 ; i++){
		if(in[i] == '-' && i == A){
			mark = 1;
		}else if(in[i] >= '0' && in[i] <= '9' ){
			++ctr;
		}
	}
	if( mark == 1 && ctr == A+B){
		printf("Yes\n");
	}else{
		printf("No\n");
	}
	
	return 0;
}
#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "debug.h"
#else
#define dump(...)
#endif
#define endl "\n"
#define ll long long
#define int long long
#define FOR(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define REP(i, x) for (int i = 0; i < (int)(x); i++)
#define REPS(i, x) for (int i = 1; i <= (int)(x); i++)
#define RREP(i, x) for (int i = ((int)(x)-1); i >= 0; i--)
#define RREPS(i, x) for (int i = ((int)(x)); i > 0; i--)
#define INF 2147483647
#define LLINF 9223372036854775807LL
#define vi vector<int>
#define vvi vector<vector<int>>
#define pi pair<int, int>
#define ALL(a) (a).begin(), (a).end()
#define BIT(n) (1LL << (n))
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end()) //sortしてからつかうこと
constexpr ll MOD = 1e9 + 7;
int dx[8] = {1, 0, -1, 0, 1, 1, -1, -1};
int dy[8] = {0, 1, 0, -1, 1, -1, 1, -1};
ll A, B, C, D, E, F, G, H, N, M, L, K, P, Q, R, W, X, Y, Z;
string S, T;
ll ans = 0;

template <typename T>
istream &operator>>(istream &is, vector<T> &vec) {
    for (T &x : vec)
        is >> x;
    return is;
}

vector<pair<long long, long long>> primeFactorize(long long N) {
    vector<pair<long long, long long>> res;
    for (long long i = 2; i * i <= N; ++i) {
        if (N % i != 0)
            continue;
        long long powInd = 0;
        while (N % i == 0) {
            powInd++;
            N /= i;
        }
        res.push_back({i, powInd});
    }
    if (N != 1)
        res.push_back({N, 1});
    return res;
}

signed main() {
    cin >> A >> B;
    N = gcd(A, B);
    auto v = primeFactorize(N);
    dump(v);
    cout << v.size() + 1 << endl;
}