/** * @FileName a.cpp * @Author kanpurin * @Created 2020.05.22 17:45:01 **/ #include "bits/stdc++.h" using namespace std; typedef long long ll; int main() { int t; cin >> t; for (int i = 0; i < t; i++) { vector< pair< double, double > > a(6); for (int j = 0; j < 6; j++) { cin >> a[j].first >> a[j].second; } vector< double > kaku; for (int j = 0; j < 6; j++) { if (a[j].first >= 0.510163608542304 && a[j].second >= -0.000000000001) { kaku.push_back((a[j].second / a[j].first)); } } cout << kaku.size() << endl; sort(kaku.begin(), kaku.end()); printf("%.10f\n",atan(kaku[0])*180/acos(-1)); } return 0; }