:- pred longest(int::in, int::out, int::out) is det.