#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, a, pos;
  cin >> n >> a;
  double mini = 999999;
  double tm = 180 - (360 / (double)n);
  double angle = tm / ((double)n - 2);
  for (long long int i = 1; i <= n - 2; i++) {
    double val = angle * i;
    if (abs(val - (double)a) < mini) {
      mini = abs(val - (double)a);
      pos = i;
    }
  }
  cout << "1 2 " << (n - pos + 1);
  return 0;
}
