#include using namespace std; using ll = long long; int main(){ int N, A, B, M, K, d; cin >> N >> A >> B; M = 1<<(N+1); vector X(N+1), Y(N+1), Z(N+1); for (int i=1; i<=N; i++) cin >> X[i] >> Y[i] >> Z[i]; vector>> dp(M, vector(N+1, vector(N+1))); for (int i=1; i<=N; i++) dp[1<