import std.algorithm;
import std.array;
import std.ascii;
import std.conv;
import std.math;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

T read(T)() { return readln.chomp.to!T; }
T[] reads(T)() { return readln.split.to!(T[]); }
alias readint = read!int;
alias readints = reads!int;

bool calc(int a, int b, string s) {
    if (s[a] != '-') return false;

    for (int i = 0; i < s.length; i++) {
        if (i == a) continue;
        if (!isDigit(s[i])) return false;
    }
    return true;
}

void main() {
    auto ab = readints;
    int a = ab[0], b = ab[1];
    auto s = read!string;

    writeln(calc(a, b, s) ? "Yes" : "No");
}
