#include <bits/stdc++.h>
using namespace std;
int n, a;
int main() {
  cin >> n >> a;
  double each = double(180.0 * (n - 2)) / n;
  double per = each / (n - 2);
  int i = a / per;
  if (a - i * per > (i + 1) * per - a) ++i;
  i += 2;
  if (i <= 2) i = 3;
  if (i > n) i = n;
  cout << "2 1 " << i;
  return 0;
}
