#include <bits/stdc++.h>
using namespace std;
int main() {
  long double n, a;
  cin >> n >> a;
  long double base = 180 / n;
  long double current_angle;
  long double diffr = 1000000.0;
  int indx = n;
  int ans = 3;
  for (long double i = 0; i < n - 2; i++) {
    current_angle = base + (base * i);
    if (abs(current_angle - a) < diffr) {
      diffr = abs(current_angle - a);
      ans = indx;
    }
    indx--;
  }
  cout << "1 2 " << ans << "\n";
  return 0;
}
