#include <bits/stdc++.h>
using namespace std;
signed main() {
  double a, b;
  cin >> a >> b;
  double ans = 1e18;
  double pos;
  double temp = 0.0000;
  double temp1 = 1.000000 * 180 / a;
  for (double i = 3; i <= a; ++i) {
    temp = (i - 2) * temp1;
    if (fabs(b - temp) < ans) {
      ans = fabs(b - temp);
      pos = i;
    }
  }
  cout << "2 1 " << pos << endl;
  return 0;
}
