#include <bits/stdc++.h>
using namespace std;
int n, a, ang, pct;
int abs(int x) {
  if (x < 0) x = -x;
  return x;
}
int main() {
  cin >> n >> a;
  cout << "1 2 ";
  if ((n - 2) * 180 <= a * n or n == 3)
    cout << "3";
  else {
    ang = (n - 2) * 180;
    pct = 3;
    while (ang > a * n and pct < n) {
      pct = pct + 1;
      ang = ang - 180;
    }
    if (abs(ang - a * n) < abs(ang - a * n + 180))
      cout << pct;
    else
      cout << pct - 1;
  }
  return 0;
}
