#include <bits/stdc++.h>
using namespace std;
int i;
double n, angle, sin_angle, m;
int main() {
  cin >> n >> m;
  angle = ((n - 2) * 180) / n;
  sin_angle = (double)(angle / (n - 2));
  if (m <= sin_angle)
    i = 1;
  else if (m >= angle)
    i = n - 2;
  else {
    i = (m / sin_angle);
    if ((m - i * sin_angle) > ((i + 1) * sin_angle - m)) i++;
  }
  cout << 1 << " " << 2 << " " << (n - i + 1);
  return 0;
}
