#include <bits/stdc++.h>
using namespace std;
int main() {
  double n;
  double m;
  cin >> n >> m;
  double singang = (double)180 / n;
  int indx;
  double minn = 18000000;
  for (int i = 3; i < n + 1; i++) {
    double curr = (double)(i - 2) * singang;
    double re = abs(curr - m);
    if (re > minn) break;
    minn = re;
    indx = i;
  }
  cout << 2 << " " << 1 << " " << indx;
  return 0;
}
