import java.util.*;
import java.lang.*;
import java.io.*;
class Ideone
{
{
Scanner in
= new Scanner
(System.
in); int a, b, b1, a1, a2, m, k=0;
a = in.nextInt();
b = in.nextInt();
b1=b%10;
a1=(a/100);
a2=(a/10)%10;
if (a1
>9) {System.
out.
printf("Такой группы не существует");} else {
if (b1
-a2
>5) {System.
out.
printf("Такой группы не существует");} else {
if (a1
==1) {System.
out.
printf("Исторический факультет \n");} if (a1
==2) {System.
out.
printf("Экономический факультет \n");} if (a1
==3) {System.
out.
printf("Юридический факультет \n");} if (a1
==4) {System.
out.
printf("Математический факультет \n");} if (a1
==5) {System.
out.
printf("Физический факультет \n");} if (a1
==6) {System.
out.
printf("Химический факультет \n");} if (a1
==7) {System.
out.
printf("Биологический факультет \n");} if (a1
==8) {System.
out.
printf("Филологический факультет \n");} if (a1
==9) {System.
out.
printf("Географический факультет \n");} if (a1
==0) {System.
out.
printf("Социологический факультет \n");} m=b-((10+b1-a2)%10);
System.
out.
printf("Год поступления %d", m
); }
}
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgpjbGFzcyBJZGVvbmUKewoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpIHRocm93cyBqYXZhLmxhbmcuRXhjZXB0aW9uCgl7CgkJU2Nhbm5lciBpbiA9IG5ldyBTY2FubmVyKFN5c3RlbS5pbik7CgkJaW50IGEsIGIsIGIxLCBhMSwgYTIsIG0sIGs9MDsKCQlhID0gaW4ubmV4dEludCgpOwoJCWIgPSBpbi5uZXh0SW50KCk7CgkgICAgYjE9YiUxMDsKCSAgICBhMT0oYS8xMDApOwoJICAgIGEyPShhLzEwKSUxMDsgCgkgICAgaWYgKGExPjkpIHtTeXN0ZW0ub3V0LnByaW50Zigi0KLQsNC60L7QuSDQs9GA0YPQv9C/0Ysg0L3QtSDRgdGD0YnQtdGB0YLQstGD0LXRgiIpO30KCSAgICBlbHNlIHsKCSAgICAgICAgaWYgKGIxLWEyPjUpIHtTeXN0ZW0ub3V0LnByaW50Zigi0KLQsNC60L7QuSDQs9GA0YPQv9C/0Ysg0L3QtSDRgdGD0YnQtdGB0YLQstGD0LXRgiIpO30KCSAgICAgICAgZWxzZSB7CgkgICAgICAgICAgICAgICAgaWYgKGExPT0xKSB7U3lzdGVtLm91dC5wcmludGYoItCY0YHRgtC+0YDQuNGH0LXRgdC60LjQuSDRhNCw0LrRg9C70YzRgtC10YIgXG4iKTt9CgkgICAgICAgICAgICAgICAgaWYgKGExPT0yKSB7U3lzdGVtLm91dC5wcmludGYoItCt0LrQvtC90L7QvNC40YfQtdGB0LrQuNC5INGE0LDQutGD0LvRjNGC0LXRgiBcbiIpO30KCSAgICAgICAgICAgICAgICBpZiAoYTE9PTMpIHtTeXN0ZW0ub3V0LnByaW50Zigi0K7RgNC40LTQuNGH0LXRgdC60LjQuSDRhNCw0LrRg9C70YzRgtC10YIgXG4iKTt9CgkgICAgICAgICAgICAgICAgaWYgKGExPT00KSB7U3lzdGVtLm91dC5wcmludGYoItCc0LDRgtC10LzQsNGC0LjRh9C10YHQutC40Lkg0YTQsNC60YPQu9GM0YLQtdGCIFxuIik7fQoJICAgICAgICAgICAgICAgIGlmIChhMT09NSkge1N5c3RlbS5vdXQucHJpbnRmKCLQpNC40LfQuNGH0LXRgdC60LjQuSDRhNCw0LrRg9C70YzRgtC10YIgXG4iKTt9CgkgICAgICAgICAgICAgICAgaWYgKGExPT02KSB7U3lzdGVtLm91dC5wcmludGYoItCl0LjQvNC40YfQtdGB0LrQuNC5INGE0LDQutGD0LvRjNGC0LXRgiBcbiIpO30KCSAgICAgICAgICAgICAgICBpZiAoYTE9PTcpIHtTeXN0ZW0ub3V0LnByaW50Zigi0JHQuNC+0LvQvtCz0LjRh9C10YHQutC40Lkg0YTQsNC60YPQu9GM0YLQtdGCIFxuIik7fQoJICAgICAgICAgICAgICAgIGlmIChhMT09OCkge1N5c3RlbS5vdXQucHJpbnRmKCLQpNC40LvQvtC70L7Qs9C40YfQtdGB0LrQuNC5INGE0LDQutGD0LvRjNGC0LXRgiBcbiIpO30KCSAgICAgICAgICAgICAgICBpZiAoYTE9PTkpIHtTeXN0ZW0ub3V0LnByaW50Zigi0JPQtdC+0LPRgNCw0YTQuNGH0LXRgdC60LjQuSDRhNCw0LrRg9C70YzRgtC10YIgXG4iKTt9CgkgICAgICAgICAgICAgICAgaWYgKGExPT0wKSB7U3lzdGVtLm91dC5wcmludGYoItCh0L7RhtC40L7Qu9C+0LPQuNGH0LXRgdC60LjQuSDRhNCw0LrRg9C70YzRgtC10YIgXG4iKTt9CgkgICAgICAgICAgICAgICAgbT1iLSgoMTArYjEtYTIpJTEwKTsKCSAgICAgICAgICAgICAgICBTeXN0ZW0ub3V0LnByaW50Zigi0JPQvtC0INC/0L7RgdGC0YPQv9C70LXQvdC40Y8gJWQiLCBtKTsKCSAgICAgICAgfQoJICAgIH0gICAgCgl9Cn0=