add is_triangle and un_triangle & testcase