#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int a;
  cin >> n >> a;
  int st = 2, mid = 1, last = 3, fin_last = 3;
  double ang = (double)180 / (double)n;
  double diff = abs(ang - a);
  for (last = 4; last <= n; last++) {
    if (abs((last - 2) * ang - a) < diff) {
      fin_last = last;
      diff = abs((last - 2) * ang - a);
    }
  }
  cout << st << ' ' << mid << ' ' << fin_last << endl;
}
