#!/usr/bin/perl
#abc84_b.pl
#Sun Jan  7 18:40:35 2018
#

use warnings;
use strict;

my $nums = <STDIN>;
chomp $nums;
my @numbers = split(" ",$nums);
my $letter = <STDIN>;
chomp $letter;

my @letters = split("\-",$letter);

print $letters[0],"\n";

if ($#letters!=1){
	print "No\n";
}elsif(length($letters[0])==$numbers[0]){
	print "Yes\n";
}else{
	print "No\n";
}
