import java.util.Scanner;
import java.io.*;

public class Main {
public static void main(String args[]) {
Scanner cro=new Scanner(System.in);
BufferedReader c=new BufferedReader(new InputStreamReader(System.in));
String s,s1;
int A,B,i,C;
C=0;
A=cro.nextInt();
B=cro.nextInt();
s1=cro.nextLine();
s=cro.nextLine();
for(i=0;i<A;i++) if(Character.isDigit(s.charAt(i))) C++;
if(s.charAt(A)=='-') C++;
for(i=A+1;i<A+B+1;i++) if(Character.isDigit(s.charAt(i))) C++;
if(C==A+B+1) System.out.println("Yes");
else System.out.println("No");
}   
} import java.util.Scanner; Scanner java.util import java.io.*; io.* java public class Main {
public static void main(String args[]) {
Scanner cro=new Scanner(System.in);
BufferedReader c=new BufferedReader(new InputStreamReader(System.in));
String s,s1;
int A,B,i,C;
C=0;
A=cro.nextInt();
B=cro.nextInt();
s1=cro.nextLine();
s=cro.nextLine();
for(i=0;i<A;i++) if(Character.isDigit(s.charAt(i))) C++;
if(s.charAt(A)=='-') C++;
for(i=A+1;i<A+B+1;i++) if(Character.isDigit(s.charAt(i))) C++;
if(C==A+B+1) System.out.println("Yes");
else System.out.println("No");
}   
} Main public static void main(String args[]) {
Scanner cro=new Scanner(System.in);
BufferedReader c=new BufferedReader(new InputStreamReader(System.in));
String s,s1;
int A,B,i,C;
C=0;
A=cro.nextInt();
B=cro.nextInt();
s1=cro.nextLine();
s=cro.nextLine();
for(i=0;i<A;i++) if(Character.isDigit(s.charAt(i))) C++;
if(s.charAt(A)=='-') C++;
for(i=A+1;i<A+B+1;i++) if(Character.isDigit(s.charAt(i))) C++;
if(C==A+B+1) System.out.println("Yes");
else System.out.println("No");
} main {
Scanner cro=new Scanner(System.in);
BufferedReader c=new BufferedReader(new InputStreamReader(System.in));
String s,s1;
int A,B,i,C;
C=0;
A=cro.nextInt();
B=cro.nextInt();
s1=cro.nextLine();
s=cro.nextLine();
for(i=0;i<A;i++) if(Character.isDigit(s.charAt(i))) C++;
if(s.charAt(A)=='-') C++;
for(i=A+1;i<A+B+1;i++) if(Character.isDigit(s.charAt(i))) C++;
if(C==A+B+1) System.out.println("Yes");
else System.out.println("No");
} Scanner cro=new Scanner(System.in); cro new Scanner(System.in) BufferedReader c=new BufferedReader(new InputStreamReader(System.in)); c new BufferedReader(new InputStreamReader(System.in)) String s s s1; s1 int A A B B i i C; C C=0 C 0 A=cro.nextInt() A cro.nextInt() cro.nextInt cro B=cro.nextInt() B cro.nextInt() cro.nextInt cro s1=cro.nextLine() s1 cro.nextLine() cro.nextLine cro s=cro.nextLine() s cro.nextLine() cro.nextLine cro for(i=0;i<A;i++) if(Character.isDigit(s.charAt(i))) C++; i=0; i=0 i 0 i<A i A i++ i++ i if(Character.isDigit(s.charAt(i))) C++; if(Character.isDigit(s.charAt(i))) C++; Character.isDigit(s.charAt(i)) Character.isDigit Character s.charAt(i) s.charAt s i C++ C if(s.charAt(A)=='-') C++; s.charAt(A)=='-' s.charAt(A) s.charAt s A '-' C++ C for(i=A+1;i<A+B+1;i++) if(Character.isDigit(s.charAt(i))) C++; i=A+1; i=A+1 i A+1 A 1 i<A+B+1 i A+B+1 A+B+1 A B 1 i++ i++ i if(Character.isDigit(s.charAt(i))) C++; if(Character.isDigit(s.charAt(i))) C++; Character.isDigit(s.charAt(i)) Character.isDigit Character s.charAt(i) s.charAt s i C++ C if(C==A+B+1) System.out.println("Yes");
else System.out.println("No"); C==A+B+1 C A+B+1 A+B+1 A B 1 System.out.println("Yes") System.out.println System.out System System.out "Yes" System.out.println("No") System.out.println System.out System System.out "No" String args[] args public class Main {
public static void main(String args[]) {
Scanner cro=new Scanner(System.in);
BufferedReader c=new BufferedReader(new InputStreamReader(System.in));
String s,s1;
int A,B,i,C;
C=0;
A=cro.nextInt();
B=cro.nextInt();
s1=cro.nextLine();
s=cro.nextLine();
for(i=0;i<A;i++) if(Character.isDigit(s.charAt(i))) C++;
if(s.charAt(A)=='-') C++;
for(i=A+1;i<A+B+1;i++) if(Character.isDigit(s.charAt(i))) C++;
if(C==A+B+1) System.out.println("Yes");
else System.out.println("No");
}   
} public class Main {
public static void main(String args[]) {
Scanner cro=new Scanner(System.in);
BufferedReader c=new BufferedReader(new InputStreamReader(System.in));
String s,s1;
int A,B,i,C;
C=0;
A=cro.nextInt();
B=cro.nextInt();
s1=cro.nextLine();
s=cro.nextLine();
for(i=0;i<A;i++) if(Character.isDigit(s.charAt(i))) C++;
if(s.charAt(A)=='-') C++;
for(i=A+1;i<A+B+1;i++) if(Character.isDigit(s.charAt(i))) C++;
if(C==A+B+1) System.out.println("Yes");
else System.out.println("No");
}   
} Main
import java.util.Scanner;
import java.io.*;

public class Main {
public static void main(String args[]) {
Scanner cro=new Scanner(System.in);
BufferedReader c=new BufferedReader(new InputStreamReader(System.in));
String s,s1;
int A,B,i,C;
C=0;
A=cro.nextInt();
B=cro.nextInt();
s1=cro.nextLine();
s=cro.nextLine();
for(i=0;i<A;i++) if(Character.isDigit(s.charAt(i))) C++;
if(s.charAt(A)=='-') C++;
for(i=A+1;i<A+B+1;i++) if(Character.isDigit(s.charAt(i))) C++;
if(C==A+B+1) System.out.println("Yes");
else System.out.println("No");
}   
}