#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a;
  scanf("%d%d", &(n), &(a));
  double b = (double)(n - 2) * 180 / (double)n;
  b = (180.0 - b) / 2.0;
  int best;
  double diff = 180.0;
  for (int i = 1; i <= n - 2; i++) {
    double cand = abs(b * i - a);
    if (cand < diff) {
      best = i;
      diff = cand;
    }
  }
  cout << 2 << " " << 1 << " " << (best + 2) << endl;
  return 0;
}
