#include using namespace std; using Int = long long; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a>n; using T = tuple; vector vt; for(Int i=0;i>x>>y>>z; if(x<=y&&y>=z) swap(x,y); if(x<=z&&z>=y) swap(x,z); vt.emplace_back(x,y,z); } sort(vt.rbegin(),vt.rend()); auto check= [&](Int x,Int y,Int z,Int a,Int b,Int c){ if(x dp(n,1); for(Int i=0;i