marks = float(raw_input('Enter your marks : '))

if marks > 100 or marks < 0:
	print 'Invalid'
elif marks >= 70:
	print 'Grade A'
elif marks >= 60:
	print 'Grade B'
elif marks >= 40:
	print 'Grade C'
elif marks < 40:
	print 'Grade D'
else :
	print 'Weird !!'
9766546486eb2ef12718315c7665700b73e9a595
marks = float(raw_input('Enter your marks : '))

if marks > 100 or marks < 0:
	print 'Invalid'
elif marks >= 70:
	print 'Grade A'
elif marks >= 60:
	print 'Grade B'
elif marks >= 40:
	print 'Grade C'
elif marks < 40:
	print 'Grade D'
else :
	print 'Weird !!'