#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int a;
  cin >> n >> a;
  double angleone = 180.0 / n;
  double min = 180;
  int minn = 0;
  for (int i = 1; i <= n - 2; i++) {
    if (abs(i * angleone - a) < min) {
      min = abs(i * angleone - a);
      minn = i;
    }
  }
  cout << "2 1 " << minn + 2 << endl;
  return 0;
}
