The impact of mental fatigue on brain activity: a comparative study both in resting state and task state using EEG