import java.util.Scanner;
import java.util.ArrayList;
 
public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
      ArrayList<String> list = new ArrayList<String>();
      String S,T;
      
       while (scan.hasNextLine()) {
      String an = scan.nextLine();
      list.add(an);
      }
      S = list.get(0);
      T = list.get(1);
      check(S,T);
        scan.close();
    }
  
  public static void check(String S , String T){
    int l,s,t;
    int i = 0;
    boolean flag = true;
    s = S.length();
    t = T.length();
    l = t - s;
    char[] tst = new char[t];
    char[] sst = new char[s];
    if(l == 1){
      while(i < s){
        tst[i] = T.charAt(i);
        sst[i] = S.charAt(i);
        if( tst[i] ==  sst[i]){
          flag = true;
        }else{
          flag = false;
          break;
        }
        i++;
      }
    }else{
      System.out.println("No");
      return;
    }
    
    if(flag){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
    return;
  }
} import java.util.Scanner; Scanner java.util import java.util.ArrayList; ArrayList java.util public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
      ArrayList<String> list = new ArrayList<String>();
      String S,T;
      
       while (scan.hasNextLine()) {
      String an = scan.nextLine();
      list.add(an);
      }
      S = list.get(0);
      T = list.get(1);
      check(S,T);
        scan.close();
    }
  
  public static void check(String S , String T){
    int l,s,t;
    int i = 0;
    boolean flag = true;
    s = S.length();
    t = T.length();
    l = t - s;
    char[] tst = new char[t];
    char[] sst = new char[s];
    if(l == 1){
      while(i < s){
        tst[i] = T.charAt(i);
        sst[i] = S.charAt(i);
        if( tst[i] ==  sst[i]){
          flag = true;
        }else{
          flag = false;
          break;
        }
        i++;
      }
    }else{
      System.out.println("No");
      return;
    }
    
    if(flag){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
    return;
  }
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
      ArrayList<String> list = new ArrayList<String>();
      String S,T;
      
       while (scan.hasNextLine()) {
      String an = scan.nextLine();
      list.add(an);
      }
      S = list.get(0);
      T = list.get(1);
      check(S,T);
        scan.close();
    } main {
        Scanner scan = new Scanner(System.in);
      ArrayList<String> list = new ArrayList<String>();
      String S,T;
      
       while (scan.hasNextLine()) {
      String an = scan.nextLine();
      list.add(an);
      }
      S = list.get(0);
      T = list.get(1);
      check(S,T);
        scan.close();
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) ArrayList<String> list = new ArrayList<String>(); list new ArrayList<String>() String S S T; T while (scan.hasNextLine()) {
      String an = scan.nextLine();
      list.add(an);
      } scan.hasNextLine() scan.hasNextLine scan {
      String an = scan.nextLine();
      list.add(an);
      } String an = scan.nextLine(); an scan.nextLine() scan.nextLine scan list.add(an) list.add list an S = list.get(0) S list.get(0) list.get list 0 T = list.get(1) T list.get(1) list.get list 1 check(S,T) check S T scan.close() scan.close scan String[] args args public static void check(String S , String T){
    int l,s,t;
    int i = 0;
    boolean flag = true;
    s = S.length();
    t = T.length();
    l = t - s;
    char[] tst = new char[t];
    char[] sst = new char[s];
    if(l == 1){
      while(i < s){
        tst[i] = T.charAt(i);
        sst[i] = S.charAt(i);
        if( tst[i] ==  sst[i]){
          flag = true;
        }else{
          flag = false;
          break;
        }
        i++;
      }
    }else{
      System.out.println("No");
      return;
    }
    
    if(flag){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
    return;
  } check {
    int l,s,t;
    int i = 0;
    boolean flag = true;
    s = S.length();
    t = T.length();
    l = t - s;
    char[] tst = new char[t];
    char[] sst = new char[s];
    if(l == 1){
      while(i < s){
        tst[i] = T.charAt(i);
        sst[i] = S.charAt(i);
        if( tst[i] ==  sst[i]){
          flag = true;
        }else{
          flag = false;
          break;
        }
        i++;
      }
    }else{
      System.out.println("No");
      return;
    }
    
    if(flag){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
    return;
  } int l l s s t; t int i = 0; i 0 boolean flag = true; flag true s = S.length() s S.length() S.length S t = T.length() t T.length() T.length T l = t - s l t - s t s char[] tst = new char[t]; tst new char[t] t char[] sst = new char[s]; sst new char[s] s if(l == 1){
      while(i < s){
        tst[i] = T.charAt(i);
        sst[i] = S.charAt(i);
        if( tst[i] ==  sst[i]){
          flag = true;
        }else{
          flag = false;
          break;
        }
        i++;
      }
    }else{
      System.out.println("No");
      return;
    } l == 1 l 1 {
      while(i < s){
        tst[i] = T.charAt(i);
        sst[i] = S.charAt(i);
        if( tst[i] ==  sst[i]){
          flag = true;
        }else{
          flag = false;
          break;
        }
        i++;
      }
    } while(i < s){
        tst[i] = T.charAt(i);
        sst[i] = S.charAt(i);
        if( tst[i] ==  sst[i]){
          flag = true;
        }else{
          flag = false;
          break;
        }
        i++;
      } i < s i s {
        tst[i] = T.charAt(i);
        sst[i] = S.charAt(i);
        if( tst[i] ==  sst[i]){
          flag = true;
        }else{
          flag = false;
          break;
        }
        i++;
      } tst[i] = T.charAt(i) tst[i] tst i T.charAt(i) T.charAt T i sst[i] = S.charAt(i) sst[i] sst i S.charAt(i) S.charAt S i if( tst[i] ==  sst[i]){
          flag = true;
        }else{
          flag = false;
          break;
        } tst[i] ==  sst[i] tst[i] tst i sst[i] sst i {
          flag = true;
        } flag = true flag true {
          flag = false;
          break;
        } flag = false flag false break; i++ i {
      System.out.println("No");
      return;
    } System.out.println("No") System.out.println System.out System System.out "No" return; if(flag){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    } flag {
      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" return; String S S String T T public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
      ArrayList<String> list = new ArrayList<String>();
      String S,T;
      
       while (scan.hasNextLine()) {
      String an = scan.nextLine();
      list.add(an);
      }
      S = list.get(0);
      T = list.get(1);
      check(S,T);
        scan.close();
    }
  
  public static void check(String S , String T){
    int l,s,t;
    int i = 0;
    boolean flag = true;
    s = S.length();
    t = T.length();
    l = t - s;
    char[] tst = new char[t];
    char[] sst = new char[s];
    if(l == 1){
      while(i < s){
        tst[i] = T.charAt(i);
        sst[i] = S.charAt(i);
        if( tst[i] ==  sst[i]){
          flag = true;
        }else{
          flag = false;
          break;
        }
        i++;
      }
    }else{
      System.out.println("No");
      return;
    }
    
    if(flag){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
    return;
  }
} public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
      ArrayList<String> list = new ArrayList<String>();
      String S,T;
      
       while (scan.hasNextLine()) {
      String an = scan.nextLine();
      list.add(an);
      }
      S = list.get(0);
      T = list.get(1);
      check(S,T);
        scan.close();
    }
  
  public static void check(String S , String T){
    int l,s,t;
    int i = 0;
    boolean flag = true;
    s = S.length();
    t = T.length();
    l = t - s;
    char[] tst = new char[t];
    char[] sst = new char[s];
    if(l == 1){
      while(i < s){
        tst[i] = T.charAt(i);
        sst[i] = S.charAt(i);
        if( tst[i] ==  sst[i]){
          flag = true;
        }else{
          flag = false;
          break;
        }
        i++;
      }
    }else{
      System.out.println("No");
      return;
    }
    
    if(flag){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
    return;
  }
} Main
import java.util.Scanner;
import java.util.ArrayList;
 
public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
      ArrayList<String> list = new ArrayList<String>();
      String S,T;
      
       while (scan.hasNextLine()) {
      String an = scan.nextLine();
      list.add(an);
      }
      S = list.get(0);
      T = list.get(1);
      check(S,T);
        scan.close();
    }
  
  public static void check(String S , String T){
    int l,s,t;
    int i = 0;
    boolean flag = true;
    s = S.length();
    t = T.length();
    l = t - s;
    char[] tst = new char[t];
    char[] sst = new char[s];
    if(l == 1){
      while(i < s){
        tst[i] = T.charAt(i);
        sst[i] = S.charAt(i);
        if( tst[i] ==  sst[i]){
          flag = true;
        }else{
          flag = false;
          break;
        }
        i++;
      }
    }else{
      System.out.println("No");
      return;
    }
    
    if(flag){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
    return;
  }
}