bool check(NODE &ans,NODE &begin,NODE &end) { if(ans.good()==1 && ans>=begin && end>=ans) return true; return false; }