On non-measurable sets and invariant tori