import java.io.BufferedReader;
import java.io.FileReader;
import java.security.MessageDigest;
public class MainClass {
public static void main(String args[]) throws Exception {
String name = "";
String passwd = "";
BufferedReader in = new BufferedReader(new FileReader("passwd.txt"));
while ((name = in.readLine()) != null) {
passwd = in.readLine();
if (name.equals(args[0])) {
break;
}
}
MessageDigest m = MessageDigest.getInstance("MD5");
m.update(args[1].getBytes("UTF8"));
byte s[] = m.digest();
String result = "";
for (int i = 0; i < s.length; i++) {
result += Integer.toHexString((0x000000ff & s[i]) | 0xffffff00).substring(6);
}
System.out.println(name.equals(args[0]) && result.equals(passwd));
}
}