import java.util.*;
import java.util.regex.Pattern;

class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    String s = sc.next();
    String t = sc.next();

    if(s.length() <= 0 || s.length() >= 11) {
      System.out.println("No");
      System.exit(0);
    }

    if((t.length()-s.length()) != 1) {
      System.out.println("No");
      System.exit(0);
    }

    if(isHalfAlphanumeric(s) == false) {
      System.out.println("No");
      System.exit(0);
    }

    if(isHalfAlphanumeric(t) == false) {
      System.out.println("No");
      System.exit(0);
    }

    if(t.substring(0, s.length()).equals(s)) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
    sc.close();
  }
  public static boolean isHalfAlphanumeric(String str) {
    return Pattern.matches("^[a-z]+$", str);
  }
} import java.util.*; util.* java import java.util.regex.Pattern; Pattern java.util.regex class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    String s = sc.next();
    String t = sc.next();

    if(s.length() <= 0 || s.length() >= 11) {
      System.out.println("No");
      System.exit(0);
    }

    if((t.length()-s.length()) != 1) {
      System.out.println("No");
      System.exit(0);
    }

    if(isHalfAlphanumeric(s) == false) {
      System.out.println("No");
      System.exit(0);
    }

    if(isHalfAlphanumeric(t) == false) {
      System.out.println("No");
      System.exit(0);
    }

    if(t.substring(0, s.length()).equals(s)) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
    sc.close();
  }
  public static boolean isHalfAlphanumeric(String str) {
    return Pattern.matches("^[a-z]+$", str);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    String s = sc.next();
    String t = sc.next();

    if(s.length() <= 0 || s.length() >= 11) {
      System.out.println("No");
      System.exit(0);
    }

    if((t.length()-s.length()) != 1) {
      System.out.println("No");
      System.exit(0);
    }

    if(isHalfAlphanumeric(s) == false) {
      System.out.println("No");
      System.exit(0);
    }

    if(isHalfAlphanumeric(t) == false) {
      System.out.println("No");
      System.exit(0);
    }

    if(t.substring(0, s.length()).equals(s)) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
    sc.close();
  } main {
    Scanner sc = new Scanner(System.in);

    String s = sc.next();
    String t = sc.next();

    if(s.length() <= 0 || s.length() >= 11) {
      System.out.println("No");
      System.exit(0);
    }

    if((t.length()-s.length()) != 1) {
      System.out.println("No");
      System.exit(0);
    }

    if(isHalfAlphanumeric(s) == false) {
      System.out.println("No");
      System.exit(0);
    }

    if(isHalfAlphanumeric(t) == false) {
      System.out.println("No");
      System.exit(0);
    }

    if(t.substring(0, s.length()).equals(s)) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
    sc.close();
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc String t = sc.next(); t sc.next() sc.next sc if(s.length() <= 0 || s.length() >= 11) {
      System.out.println("No");
      System.exit(0);
    } s.length() <= 0 || s.length() >= 11 s.length() <= 0 s.length() s.length s 0 s.length() >= 11 s.length() s.length s 11 {
      System.out.println("No");
      System.exit(0);
    } System.out.println("No") System.out.println System.out System System.out "No" System.exit(0) System.exit System 0 if((t.length()-s.length()) != 1) {
      System.out.println("No");
      System.exit(0);
    } (t.length()-s.length()) != 1 (t.length()-s.length()) t.length() t.length t s.length() s.length s 1 {
      System.out.println("No");
      System.exit(0);
    } System.out.println("No") System.out.println System.out System System.out "No" System.exit(0) System.exit System 0 if(isHalfAlphanumeric(s) == false) {
      System.out.println("No");
      System.exit(0);
    } isHalfAlphanumeric(s) == false isHalfAlphanumeric(s) isHalfAlphanumeric s false {
      System.out.println("No");
      System.exit(0);
    } System.out.println("No") System.out.println System.out System System.out "No" System.exit(0) System.exit System 0 if(isHalfAlphanumeric(t) == false) {
      System.out.println("No");
      System.exit(0);
    } isHalfAlphanumeric(t) == false isHalfAlphanumeric(t) isHalfAlphanumeric t false {
      System.out.println("No");
      System.exit(0);
    } System.out.println("No") System.out.println System.out System System.out "No" System.exit(0) System.exit System 0 if(t.substring(0, s.length()).equals(s)) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    } t.substring(0, s.length()).equals(s) t.substring(0, s.length()).equals t.substring(0, s.length()) t.substring t 0 s.length() s.length s s {
      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" sc.close() sc.close sc String[] args args public static boolean isHalfAlphanumeric(String str) {
    return Pattern.matches("^[a-z]+$", str);
  } isHalfAlphanumeric {
    return Pattern.matches("^[a-z]+$", str);
  } return Pattern.matches("^[a-z]+$", str); Pattern.matches("^[a-z]+$", str) Pattern.matches Pattern "^[a-z]+$" str String str str
import java.util.*;
import java.util.regex.Pattern;

class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    String s = sc.next();
    String t = sc.next();

    if(s.length() <= 0 || s.length() >= 11) {
      System.out.println("No");
      System.exit(0);
    }

    if((t.length()-s.length()) != 1) {
      System.out.println("No");
      System.exit(0);
    }

    if(isHalfAlphanumeric(s) == false) {
      System.out.println("No");
      System.exit(0);
    }

    if(isHalfAlphanumeric(t) == false) {
      System.out.println("No");
      System.exit(0);
    }

    if(t.substring(0, s.length()).equals(s)) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
    sc.close();
  }
  public static boolean isHalfAlphanumeric(String str) {
    return Pattern.matches("^[a-z]+$", str);
  }
}