triangle problem