#include <bits/stdc++.h>
using namespace std;
int main() {
  double n, a;
  cin >> n >> a;
  double max = ((n - 2) * (180.0)) / n;
  double ang = max;
  int v1 = 1, v2 = 2, v3 = 3;
  double min = abs(a - max);
  for (int i = 1; i < n - 2; i++) {
    ang = ang - max / (n - 2);
    if (abs(ang - a) < min) {
      min = abs(ang - a);
      v3 = 3 + i;
    }
  }
  cout << v1 << " " << v2 << " " << v3 << endl;
}
