#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, a;
  double angle;
  while (cin >> n >> a) {
    angle = (n - 2) * 180 * 1.0 / (n * 1.0) / ((n - 2) * 1.0);
    double pp = 0;
    double mini = 180;
    int tot = 0;
    for (int i = 3; i <= n; i++) {
      pp += angle;
      if (fabs(pp - a) <= mini) {
        mini = fabs(pp - a);
        tot = i;
      }
    }
    cout << "2 1 " << tot << endl;
  }
  return 0;
}
