import java.util.Scanner;

public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    String s = sc.next();

    for (int i = 0; i < s.length(); i++) {
      if (i == a) {
        if (s.charAt(i) != '-') {
          System.out.println("No");
          return;
        }
      } else {
        if (s.charAt(i) == '-') {
          System.out.println("No");
          return;
        }
      }
    }

    System.out.println("Yes");

  }
} import java.util.Scanner; Scanner java.util public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    String s = sc.next();

    for (int i = 0; i < s.length(); i++) {
      if (i == a) {
        if (s.charAt(i) != '-') {
          System.out.println("No");
          return;
        }
      } else {
        if (s.charAt(i) == '-') {
          System.out.println("No");
          return;
        }
      }
    }

    System.out.println("Yes");

  }
} Main public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    String s = sc.next();

    for (int i = 0; i < s.length(); i++) {
      if (i == a) {
        if (s.charAt(i) != '-') {
          System.out.println("No");
          return;
        }
      } else {
        if (s.charAt(i) == '-') {
          System.out.println("No");
          return;
        }
      }
    }

    System.out.println("Yes");

  } main {

    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    String s = sc.next();

    for (int i = 0; i < s.length(); i++) {
      if (i == a) {
        if (s.charAt(i) != '-') {
          System.out.println("No");
          return;
        }
      } else {
        if (s.charAt(i) == '-') {
          System.out.println("No");
          return;
        }
      }
    }

    System.out.println("Yes");

  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc String s = sc.next(); s sc.next() sc.next sc for (int i = 0; i < s.length(); i++) {
      if (i == a) {
        if (s.charAt(i) != '-') {
          System.out.println("No");
          return;
        }
      } else {
        if (s.charAt(i) == '-') {
          System.out.println("No");
          return;
        }
      }
    } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
      if (i == a) {
        if (s.charAt(i) != '-') {
          System.out.println("No");
          return;
        }
      } else {
        if (s.charAt(i) == '-') {
          System.out.println("No");
          return;
        }
      }
    } {
      if (i == a) {
        if (s.charAt(i) != '-') {
          System.out.println("No");
          return;
        }
      } else {
        if (s.charAt(i) == '-') {
          System.out.println("No");
          return;
        }
      }
    } if (i == a) {
        if (s.charAt(i) != '-') {
          System.out.println("No");
          return;
        }
      } else {
        if (s.charAt(i) == '-') {
          System.out.println("No");
          return;
        }
      } i == a i a {
        if (s.charAt(i) != '-') {
          System.out.println("No");
          return;
        }
      } if (s.charAt(i) != '-') {
          System.out.println("No");
          return;
        } s.charAt(i) != '-' s.charAt(i) s.charAt s i '-' {
          System.out.println("No");
          return;
        } System.out.println("No") System.out.println System.out System System.out "No" return; {
        if (s.charAt(i) == '-') {
          System.out.println("No");
          return;
        }
      } if (s.charAt(i) == '-') {
          System.out.println("No");
          return;
        } s.charAt(i) == '-' s.charAt(i) s.charAt s i '-' {
          System.out.println("No");
          return;
        } System.out.println("No") System.out.println System.out System System.out "No" return; System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    String s = sc.next();

    for (int i = 0; i < s.length(); i++) {
      if (i == a) {
        if (s.charAt(i) != '-') {
          System.out.println("No");
          return;
        }
      } else {
        if (s.charAt(i) == '-') {
          System.out.println("No");
          return;
        }
      }
    }

    System.out.println("Yes");

  }
} public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    String s = sc.next();

    for (int i = 0; i < s.length(); i++) {
      if (i == a) {
        if (s.charAt(i) != '-') {
          System.out.println("No");
          return;
        }
      } else {
        if (s.charAt(i) == '-') {
          System.out.println("No");
          return;
        }
      }
    }

    System.out.println("Yes");

  }
} Main
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    String s = sc.next();

    for (int i = 0; i < s.length(); i++) {
      if (i == a) {
        if (s.charAt(i) != '-') {
          System.out.println("No");
          return;
        }
      } else {
        if (s.charAt(i) == '-') {
          System.out.println("No");
          return;
        }
      }
    }

    System.out.println("Yes");

  }
}