Four classes of planetary systems