import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		boolean bl = true;
		char s[] = sc.next().toCharArray();
		char t[] = sc.next().toCharArray();
		for(int i = 0; i < s.length; i++) {
			if(s[i] != t[i])
				bl = false;
		}
		if(bl && s.length < t.length)
			System.out.println("Yes");
		else
			System.out.println("No");
	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		boolean bl = true;
		char s[] = sc.next().toCharArray();
		char t[] = sc.next().toCharArray();
		for(int i = 0; i < s.length; i++) {
			if(s[i] != t[i])
				bl = false;
		}
		if(bl && s.length < t.length)
			System.out.println("Yes");
		else
			System.out.println("No");
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		boolean bl = true;
		char s[] = sc.next().toCharArray();
		char t[] = sc.next().toCharArray();
		for(int i = 0; i < s.length; i++) {
			if(s[i] != t[i])
				bl = false;
		}
		if(bl && s.length < t.length)
			System.out.println("Yes");
		else
			System.out.println("No");
	} main {
		Scanner sc = new Scanner(System.in);
		boolean bl = true;
		char s[] = sc.next().toCharArray();
		char t[] = sc.next().toCharArray();
		for(int i = 0; i < s.length; i++) {
			if(s[i] != t[i])
				bl = false;
		}
		if(bl && s.length < t.length)
			System.out.println("Yes");
		else
			System.out.println("No");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) boolean bl = true; bl true char s[] = sc.next().toCharArray(); s sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc char t[] = sc.next().toCharArray(); t sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc for(int i = 0; i < s.length; i++) {
			if(s[i] != t[i])
				bl = false;
		} int i = 0; int i = 0; i 0 i < s.length i s.length s s.length i++ i++ i {
			if(s[i] != t[i])
				bl = false;
		} {
			if(s[i] != t[i])
				bl = false;
		} if(s[i] != t[i])
				bl = false; s[i] != t[i] s[i] s i t[i] t i bl = false bl false if(bl && s.length < t.length)
			System.out.println("Yes");
		else
			System.out.println("No"); bl && s.length < t.length bl s.length < t.length s.length s s.length t.length t t.length 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 sc = new Scanner(System.in);
		boolean bl = true;
		char s[] = sc.next().toCharArray();
		char t[] = sc.next().toCharArray();
		for(int i = 0; i < s.length; i++) {
			if(s[i] != t[i])
				bl = false;
		}
		if(bl && s.length < t.length)
			System.out.println("Yes");
		else
			System.out.println("No");
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		boolean bl = true;
		char s[] = sc.next().toCharArray();
		char t[] = sc.next().toCharArray();
		for(int i = 0; i < s.length; i++) {
			if(s[i] != t[i])
				bl = false;
		}
		if(bl && s.length < t.length)
			System.out.println("Yes");
		else
			System.out.println("No");
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		boolean bl = true;
		char s[] = sc.next().toCharArray();
		char t[] = sc.next().toCharArray();
		for(int i = 0; i < s.length; i++) {
			if(s[i] != t[i])
				bl = false;
		}
		if(bl && s.length < t.length)
			System.out.println("Yes");
		else
			System.out.println("No");
	}

}
