The relationship between class I and class II methanol masers