use std::io;

fn read_line() -> String {
    let mut s = String::new();
    io::stdin().read_line(&mut s).unwrap();
    s
}

macro_rules! from_line {
    ($($a:ident : $t:ty),+) => {
        $(let $a: $t;)+
        {
            let _line = read_line();
            let mut _it = _line.trim().split_whitespace();
            $($a = _it.next().unwrap().parse().unwrap();)+
            assert!(_it.next().is_none());
        }
    };
}

fn main() {
  from_line!(A: usize, B: usize);
  from_line!(S: String);
  let a_part = S.get(0..A).unwrap();
  let hyphen_part = S.get(A..A+1).unwrap();
  let b_part = S.get(A+1..).unwrap();
  if a_part.chars().all(char::is_numeric) && b_part.chars().all(char::is_numeric) && hyphen_part == "-" {
    println!("Yes");
    return;
  }
  println!("No");  
}
