#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 7;
const int maxm = 1e6 + 7;
double n, m;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> m;
  double x = 180 / n;
  int num = m / x;
  if (abs(num * x - m) > abs((num + 1) * x - m)) num += 1;
  if (num == 0)
    num = 1;
  else if (num > n - 2)
    num = n - 2;
  cout << n << " " << 1 << " " << n - num;
}
