Professional Documents
Culture Documents
String
String
*;
public class Main
{
public static void main(String[] args) {
String s1 = sc.nextLine();
String s2 = sc.nextLine();
for(int i=0;i<s1.length();i++)
{
if(s1.charAt(i)==s2.charAt(0))
{
int count=0;
for(int j=0;j<s2.length();j++)
{
if(s2.charAt(j)==s1.charAt(i))
{
count++;
i++;
}
}
if(count == s2.length())
{
System.out.print("yes");
break;
}
else{
System.out.print("no");
break;
}
}
}
}
}