#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a;
  cin >> n >> a;
  double pang = (n - 2) * 180;
  pang /= n;
  double sang = (180 - pang) / 2;
  double cu = sang;
  int ret = 3;
  double bang = sang;
  int c = 3;
  while (c <= n) {
    if (abs(bang - a) > abs(cu - a)) {
      bang = cu;
      ret = c;
    }
    cu += sang;
    c++;
  }
  cout << "2 1 ";
  cout << ret << endl;
  return 0;
}
