Add yes/no check algorithm and triangle algorithm