#include<bits/stdc++.h>
using namespace std;
#define sc( x ) scanf( "%d" , &x )
#define REP( i , n ) for( int i = 0 ; i < n ; ++i )
#define clr( t , val ) memset( t , val , sizeof( t ) )
#define pb push_back
#define all( v ) v.begin() , v.end()
#define SZ( v ) ((int)(v).size())
typedef long long ll;
typedef vector< int > vi;
typedef vector< ll > vll;
struct Point{
int x , y , z;
Point(){ x = y = z = 0;}
Point( int x , int y , int z ) : x( x ) , y( y ) , z( z ){}
};
Point cross( const Point &A , const Point &B ){ return Point( A.y * B.z - B.y * A.z , -(A.x * B.z - A.z * B.x) , A.x * B.y - A.y * B.x );}
bool operator == ( const Point &A , const Point &B ){ return A.x == B.x && A.y == B.y && A.z == B.z;}
Point operator -( const Point &A , const Point &B ){ return Point( A.x - B.x , A.y - B.y , A.z - B.z );}
vll v;
map< pair< ll , int > , int > memo;
int n;
int dp( ll mask , int pos ){
if( mask == (1LL<<n) - 1 ) return 0;
if( pos == SZ( v ) ) return n + 1;
pair< ll , int > state( mask , pos );
if( memo.count( state ) ) return memo[ state ];
int &dev = memo[ state ] = dp( mask , pos + 1 );
dev = min( dev , 1 + dp( mask | v[ pos ] , pos + 1 ) );
return dev;
}
int main(){
int x , y , z , tc = 0;
while( sc( n ) == 1 ){
if( n == 0 ) break;
vector< Point > P;
REP( i , n ){
sc( x ) , sc( y ) , sc( z );
P.pb( Point( x , y , z ) );
}
v.clear();
//REP( i , n ) v.pb( 1LL << i );
REP( i , n ){
for( int j = i + 1 ; j < n ; ++j ){
int mask = 0;
mask |= (1LL << i);
mask |= (1LL << j);
REP( k , n )
if( k != i && k != j && cross( P[ j ] - P[ i ] , P[ k ] - P[ i ] ) == Point() ) mask |= (1LL << k);
v.pb( mask );
}
}
memo.clear();
if( n <= 3 )
printf( "Target set %d can be cleared using only 1 shots.\n" , ++tc );
else printf( "Target set %d can be cleared using only %d shots.\n" , ++tc , dp( 0 , 0 ) );
//cout << SZ( memo ) << endl;
}
}
I2luY2x1ZGU8Yml0cy9zdG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