hovaten = str(input())
print("Họ Và Tên :",hovaten);
tx1 = float(input())
tx2 = float(input())
tx3 = float(input())
dgk = float(input())
dck = float(input())
tbhk = ((tx1 + tx2 + tx3)+2*dgk + 3*dck)/8;
print("Điểm trung bình học kì là :", tbhk);
if tbhk>=9 :
print("xếp loại học lực xuất sắc");
if (tbhk<9) and (tbhk>8):
print(" xếp loại học inh giỏi");
if (tbhk<8) and (tbhk >= 6.5):
print("xếp loại học sinh khá");
if (tbhk< 5) and (tbhk>= 3.5):
print("xếp loại học sinh trung bình");
if (tbhk< 6.5) and (tbhk>= 5):
print("xếp loại học sinh yếu");
if tbhk < 3.5:
print("xếp loại học sinh kém") ;