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