#include <bits/stdc++.h>
using namespace std;
int main() {
  double n, a;
  cin >> n >> a;
  double deg = (360.0 / n) / 2.0;
  double ans = -360;
  int ci;
  double curr;
  for (int i = 1; i <= n - 2; i++) {
    curr = i * deg;
    if (abs(a - curr) < abs(a - ans)) {
      ans = curr;
      ci = 2 + i;
    }
  }
  cout << "2 1 " << ci << endl;
}
