Hamilton Identity for Gradient Ricci Solitons