#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, v;
  cin >> n >> a;
  int sum = (n - 2) * 180;
  double maxa = (double)sum / n;
  double p = maxa / (n - 2);
  double best = fabs(a - maxa);
  double t = maxa;
  v = n;
  int bv = n;
  while (t > a) {
    t -= p;
    v--;
    if (v < 3) break;
    if (fabs(t - a) < best) {
      best = fabs(t - a);
      bv = v;
    }
  }
  cout << "2 1 " << bv;
  return 0;
}
