<?php

$inputs = explode("\n", file_get_contents("php://stdin"));
list($meta, $postalCode) = $inputs;
list($a, $b) = array_map("intval", explode(" ", $meta));
 
if (strlen($postalCode) !== $a + $b + 1) {
  echo "No";
} else if($postalCode[$a] !== '-') {
  echo "No";
}
 
$postalParts = explode("-", $postalCode);
foreach($postalParts as $parts) {
  if (!is_numeric($parts)) {
    echo "No";
    exit;
  }
}
 
echo "Yes";