#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int n, a;
  cin >> n >> a;
  double angd = 180 * 1.0 / n;
  cout << "2 1 ";
  int x = floor(a / angd);
  if (x == 0)
    cout << 3 << endl;
  else if (a - x * angd < (1 + x) * angd - a)
    cout << min(x + 2, n) << endl;
  else
    cout << min(x + 3, n) << endl;
  return 0;
}
