friend ostream& operator<<(ostream& out, int x){ out << names[x] << " " << ages[x] <<endl; return out; }