import java.util.Scanner;

public class Main {
	  
	public static void main(String args[]) {
		    Scanner scanner = new Scanner(System.in);
		    
		    int a = scanner.nextInt();
		    int b = scanner.nextInt();
		    String s = scanner.next();
		    
		    int count = 0;
		    
		    for(int i = 0; i < s.length(); i++) 
		    {
		    	if(s.substring(i, i+1).equals("-")) 
		    	{
		    		count++;
		    	}
		    }
		    
		    
		    if(count == 1) 
		    {
		    	if(s.indexOf("-") == a) 
		    	{
		    		System.out.println("Yes");
		    	}
		    	else 
		    	{
		    		System.out.println("No");
		    	}
		    }
		    else 
	    	{
	    		System.out.println("No");
	    	}
			
		    scanner.close(); }
		  } import java.util.Scanner; Scanner java.util public class Main {
	  
	public static void main(String args[]) {
		    Scanner scanner = new Scanner(System.in);
		    
		    int a = scanner.nextInt();
		    int b = scanner.nextInt();
		    String s = scanner.next();
		    
		    int count = 0;
		    
		    for(int i = 0; i < s.length(); i++) 
		    {
		    	if(s.substring(i, i+1).equals("-")) 
		    	{
		    		count++;
		    	}
		    }
		    
		    
		    if(count == 1) 
		    {
		    	if(s.indexOf("-") == a) 
		    	{
		    		System.out.println("Yes");
		    	}
		    	else 
		    	{
		    		System.out.println("No");
		    	}
		    }
		    else 
	    	{
	    		System.out.println("No");
	    	}
			
		    scanner.close(); }
		  } Main public static void main(String args[]) {
		    Scanner scanner = new Scanner(System.in);
		    
		    int a = scanner.nextInt();
		    int b = scanner.nextInt();
		    String s = scanner.next();
		    
		    int count = 0;
		    
		    for(int i = 0; i < s.length(); i++) 
		    {
		    	if(s.substring(i, i+1).equals("-")) 
		    	{
		    		count++;
		    	}
		    }
		    
		    
		    if(count == 1) 
		    {
		    	if(s.indexOf("-") == a) 
		    	{
		    		System.out.println("Yes");
		    	}
		    	else 
		    	{
		    		System.out.println("No");
		    	}
		    }
		    else 
	    	{
	    		System.out.println("No");
	    	}
			
		    scanner.close(); } main {
		    Scanner scanner = new Scanner(System.in);
		    
		    int a = scanner.nextInt();
		    int b = scanner.nextInt();
		    String s = scanner.next();
		    
		    int count = 0;
		    
		    for(int i = 0; i < s.length(); i++) 
		    {
		    	if(s.substring(i, i+1).equals("-")) 
		    	{
		    		count++;
		    	}
		    }
		    
		    
		    if(count == 1) 
		    {
		    	if(s.indexOf("-") == a) 
		    	{
		    		System.out.println("Yes");
		    	}
		    	else 
		    	{
		    		System.out.println("No");
		    	}
		    }
		    else 
	    	{
	    		System.out.println("No");
	    	}
			
		    scanner.close(); } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner int b = scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner String s = scanner.next(); s scanner.next() scanner.next scanner int count = 0; count 0 for(int i = 0; i < s.length(); i++) 
		    {
		    	if(s.substring(i, i+1).equals("-")) 
		    	{
		    		count++;
		    	}
		    } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
		    	if(s.substring(i, i+1).equals("-")) 
		    	{
		    		count++;
		    	}
		    } {
		    	if(s.substring(i, i+1).equals("-")) 
		    	{
		    		count++;
		    	}
		    } if(s.substring(i, i+1).equals("-")) 
		    	{
		    		count++;
		    	} s.substring(i, i+1).equals("-") s.substring(i, i+1).equals s.substring(i, i+1) s.substring s i i+1 i 1 "-" {
		    		count++;
		    	} count++ count if(count == 1) 
		    {
		    	if(s.indexOf("-") == a) 
		    	{
		    		System.out.println("Yes");
		    	}
		    	else 
		    	{
		    		System.out.println("No");
		    	}
		    }
		    else 
	    	{
	    		System.out.println("No");
	    	} count == 1 count 1 {
		    	if(s.indexOf("-") == a) 
		    	{
		    		System.out.println("Yes");
		    	}
		    	else 
		    	{
		    		System.out.println("No");
		    	}
		    } if(s.indexOf("-") == a) 
		    	{
		    		System.out.println("Yes");
		    	}
		    	else 
		    	{
		    		System.out.println("No");
		    	} s.indexOf("-") == a s.indexOf("-") s.indexOf s "-" a {
		    		System.out.println("Yes");
		    	} System.out.println("Yes") System.out.println System.out System System.out "Yes" {
		    		System.out.println("No");
		    	} System.out.println("No") System.out.println System.out System System.out "No" {
	    		System.out.println("No");
	    	} System.out.println("No") System.out.println System.out System System.out "No" scanner.close() scanner.close scanner String args[] args public class Main {
	  
	public static void main(String args[]) {
		    Scanner scanner = new Scanner(System.in);
		    
		    int a = scanner.nextInt();
		    int b = scanner.nextInt();
		    String s = scanner.next();
		    
		    int count = 0;
		    
		    for(int i = 0; i < s.length(); i++) 
		    {
		    	if(s.substring(i, i+1).equals("-")) 
		    	{
		    		count++;
		    	}
		    }
		    
		    
		    if(count == 1) 
		    {
		    	if(s.indexOf("-") == a) 
		    	{
		    		System.out.println("Yes");
		    	}
		    	else 
		    	{
		    		System.out.println("No");
		    	}
		    }
		    else 
	    	{
	    		System.out.println("No");
	    	}
			
		    scanner.close(); }
		  } public class Main {
	  
	public static void main(String args[]) {
		    Scanner scanner = new Scanner(System.in);
		    
		    int a = scanner.nextInt();
		    int b = scanner.nextInt();
		    String s = scanner.next();
		    
		    int count = 0;
		    
		    for(int i = 0; i < s.length(); i++) 
		    {
		    	if(s.substring(i, i+1).equals("-")) 
		    	{
		    		count++;
		    	}
		    }
		    
		    
		    if(count == 1) 
		    {
		    	if(s.indexOf("-") == a) 
		    	{
		    		System.out.println("Yes");
		    	}
		    	else 
		    	{
		    		System.out.println("No");
		    	}
		    }
		    else 
	    	{
	    		System.out.println("No");
	    	}
			
		    scanner.close(); }
		  } Main
import java.util.Scanner;

public class Main {
	  
	public static void main(String args[]) {
		    Scanner scanner = new Scanner(System.in);
		    
		    int a = scanner.nextInt();
		    int b = scanner.nextInt();
		    String s = scanner.next();
		    
		    int count = 0;
		    
		    for(int i = 0; i < s.length(); i++) 
		    {
		    	if(s.substring(i, i+1).equals("-")) 
		    	{
		    		count++;
		    	}
		    }
		    
		    
		    if(count == 1) 
		    {
		    	if(s.indexOf("-") == a) 
		    	{
		    		System.out.println("Yes");
		    	}
		    	else 
		    	{
		    		System.out.println("No");
		    	}
		    }
		    else 
	    	{
	    		System.out.println("No");
	    	}
			
		    scanner.close(); }
		  }