import std.stdio, std.conv, std.string, std.algorithm,
       std.math, std.array, std.container, std.typecons;

void main() {
  auto s = readln.chomp;
  auto t = readln.chomp[0..$-1];
  if(s==t) writeln("Yes");
  else writeln("No");
}
