import java.io.*;
import java.util.*;

public class Main {

	static long m = (long) (1e9 + 7);

	public static void main(String[] args) throws IOException {
		Scanner scn = new Scanner(System.in);
//		StringBuilder sb = new StringBuilder();
//		int T = scn.nextInt(), tcs = 0;
//		A: while (tcs++ < T) {
//			int n = scn.nextInt();
//
//		}
//		System.out.println(sb);
		String s = scn.next(), t = scn.next();
		System.out.println(s.equals(t.substring(0, t.length() - 1)) ? "Yes" : "No");
	}

	static class Scanner {

		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}
	}
} import java.io.*; io.* java import java.util.*; util.* java public class Main {

	static long m = (long) (1e9 + 7);

	public static void main(String[] args) throws IOException {
		Scanner scn = new Scanner(System.in);
//		StringBuilder sb = new StringBuilder();
//		int T = scn.nextInt(), tcs = 0;
//		A: while (tcs++ < T) {
//			int n = scn.nextInt();
//
//		}
//		System.out.println(sb);
		String s = scn.next(), t = scn.next();
		System.out.println(s.equals(t.substring(0, t.length() - 1)) ? "Yes" : "No");
	}

	static class Scanner {

		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}
	}
} Main static long m = (long) (1e9 + 7); m (long) (1e9 + 7) 1e9 7 public static void main(String[] args) throws IOException {
		Scanner scn = new Scanner(System.in);
//		StringBuilder sb = new StringBuilder();
//		int T = scn.nextInt(), tcs = 0;
//		A: while (tcs++ < T) {
//			int n = scn.nextInt();
//
//		}
//		System.out.println(sb);
		String s = scn.next(), t = scn.next();
		System.out.println(s.equals(t.substring(0, t.length() - 1)) ? "Yes" : "No");
	} main {
		Scanner scn = new Scanner(System.in);
//		StringBuilder sb = new StringBuilder();
//		int T = scn.nextInt(), tcs = 0;
//		A: while (tcs++ < T) {
//			int n = scn.nextInt();
//
//		}
//		System.out.println(sb);
		String s = scn.next(), t = scn.next();
		System.out.println(s.equals(t.substring(0, t.length() - 1)) ? "Yes" : "No");
	} Scanner scn = new Scanner(System.in); scn new Scanner(System.in) String s = scn.next() s scn.next() scn.next scn t = scn.next(); t scn.next() scn.next scn System.out.println(s.equals(t.substring(0, t.length() - 1)) ? "Yes" : "No") System.out.println System.out System System.out s.equals(t.substring(0, t.length() - 1)) ? "Yes" : "No" s.equals(t.substring(0, t.length() - 1)) s.equals s t.substring(0, t.length() - 1) t.substring t 0 t.length() - 1 t.length() t.length t 1 "Yes" "No" String[] args args static class Scanner {

		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}
	} Scanner StringTokenizer st; st BufferedReader br; br public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		} Scanner {
			br = new BufferedReader(new InputStreamReader(s));
		} br = new BufferedReader(new InputStreamReader(s)) br new BufferedReader(new InputStreamReader(s)) InputStream s s public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		} next {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		} while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine()); st == null || !st.hasMoreTokens() st == null st null !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st public int nextInt() throws IOException {
			return Integer.parseInt(next());
		} nextInt {
			return Integer.parseInt(next());
		} return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next public long nextLong() throws IOException {
			return Long.parseLong(next());
		} nextLong {
			return Long.parseLong(next());
		} return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next public class Main {

	static long m = (long) (1e9 + 7);

	public static void main(String[] args) throws IOException {
		Scanner scn = new Scanner(System.in);
//		StringBuilder sb = new StringBuilder();
//		int T = scn.nextInt(), tcs = 0;
//		A: while (tcs++ < T) {
//			int n = scn.nextInt();
//
//		}
//		System.out.println(sb);
		String s = scn.next(), t = scn.next();
		System.out.println(s.equals(t.substring(0, t.length() - 1)) ? "Yes" : "No");
	}

	static class Scanner {

		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}
	}
} public class Main {

	static long m = (long) (1e9 + 7);

	public static void main(String[] args) throws IOException {
		Scanner scn = new Scanner(System.in);
//		StringBuilder sb = new StringBuilder();
//		int T = scn.nextInt(), tcs = 0;
//		A: while (tcs++ < T) {
//			int n = scn.nextInt();
//
//		}
//		System.out.println(sb);
		String s = scn.next(), t = scn.next();
		System.out.println(s.equals(t.substring(0, t.length() - 1)) ? "Yes" : "No");
	}

	static class Scanner {

		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}
	}
} Main
import java.io.*;
import java.util.*;

public class Main {

	static long m = (long) (1e9 + 7);

	public static void main(String[] args) throws IOException {
		Scanner scn = new Scanner(System.in);
//		StringBuilder sb = new StringBuilder();
//		int T = scn.nextInt(), tcs = 0;
//		A: while (tcs++ < T) {
//			int n = scn.nextInt();
//
//		}
//		System.out.println(sb);
		String s = scn.next(), t = scn.next();
		System.out.println(s.equals(t.substring(0, t.length() - 1)) ? "Yes" : "No");
	}

	static class Scanner {

		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}
	}
}