import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int a = Integer.parseInt(str[0]);
    int b = Integer.parseInt(str[1]);
    boolean flg = true;
    String s = in.readLine();
    for(int i=0; i<a+b+1; i++) {
      if(s.charAt(i)=='-' && i!=a)
        flg = false;
      if(s.charAt(i)!='-' && i==a)
        flg = false;
    }
    System.out.println(flg==true?"Yes":"No");
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int a = Integer.parseInt(str[0]);
    int b = Integer.parseInt(str[1]);
    boolean flg = true;
    String s = in.readLine();
    for(int i=0; i<a+b+1; i++) {
      if(s.charAt(i)=='-' && i!=a)
        flg = false;
      if(s.charAt(i)!='-' && i==a)
        flg = false;
    }
    System.out.println(flg==true?"Yes":"No");
  }
} Main public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int a = Integer.parseInt(str[0]);
    int b = Integer.parseInt(str[1]);
    boolean flg = true;
    String s = in.readLine();
    for(int i=0; i<a+b+1; i++) {
      if(s.charAt(i)=='-' && i!=a)
        flg = false;
      if(s.charAt(i)!='-' && i==a)
        flg = false;
    }
    System.out.println(flg==true?"Yes":"No");
  } main {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int a = Integer.parseInt(str[0]);
    int b = Integer.parseInt(str[1]);
    boolean flg = true;
    String s = in.readLine();
    for(int i=0; i<a+b+1; i++) {
      if(s.charAt(i)=='-' && i!=a)
        flg = false;
      if(s.charAt(i)!='-' && i==a)
        flg = false;
    }
    System.out.println(flg==true?"Yes":"No");
  } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String[] str = in.readLine().split(" "); str in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " int a = Integer.parseInt(str[0]); a Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 int b = Integer.parseInt(str[1]); b Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 boolean flg = true; flg true String s = in.readLine(); s in.readLine() in.readLine in for(int i=0; i<a+b+1; i++) {
      if(s.charAt(i)=='-' && i!=a)
        flg = false;
      if(s.charAt(i)!='-' && i==a)
        flg = false;
    } int i=0; int i=0; i 0 i<a+b+1 i a+b+1 a+b+1 a b 1 i++ i++ i {
      if(s.charAt(i)=='-' && i!=a)
        flg = false;
      if(s.charAt(i)!='-' && i==a)
        flg = false;
    } {
      if(s.charAt(i)=='-' && i!=a)
        flg = false;
      if(s.charAt(i)!='-' && i==a)
        flg = false;
    } if(s.charAt(i)=='-' && i!=a)
        flg = false; s.charAt(i)=='-' && i!=a s.charAt(i)=='-' s.charAt(i) s.charAt s i '-' i!=a i a flg = false flg false if(s.charAt(i)!='-' && i==a)
        flg = false; s.charAt(i)!='-' && i==a s.charAt(i)!='-' s.charAt(i) s.charAt s i '-' i==a i a flg = false flg false System.out.println(flg==true?"Yes":"No") System.out.println System.out System System.out flg==true?"Yes":"No" flg==true flg true "Yes" "No" String[] args args public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int a = Integer.parseInt(str[0]);
    int b = Integer.parseInt(str[1]);
    boolean flg = true;
    String s = in.readLine();
    for(int i=0; i<a+b+1; i++) {
      if(s.charAt(i)=='-' && i!=a)
        flg = false;
      if(s.charAt(i)!='-' && i==a)
        flg = false;
    }
    System.out.println(flg==true?"Yes":"No");
  }
} public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int a = Integer.parseInt(str[0]);
    int b = Integer.parseInt(str[1]);
    boolean flg = true;
    String s = in.readLine();
    for(int i=0; i<a+b+1; i++) {
      if(s.charAt(i)=='-' && i!=a)
        flg = false;
      if(s.charAt(i)!='-' && i==a)
        flg = false;
    }
    System.out.println(flg==true?"Yes":"No");
  }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int a = Integer.parseInt(str[0]);
    int b = Integer.parseInt(str[1]);
    boolean flg = true;
    String s = in.readLine();
    for(int i=0; i<a+b+1; i++) {
      if(s.charAt(i)=='-' && i!=a)
        flg = false;
      if(s.charAt(i)!='-' && i==a)
        flg = false;
    }
    System.out.println(flg==true?"Yes":"No");
  }
}