#include using namespace std; int main() { int N; cin >> N; for (int i = 1; i <= N / 3; i++) { for (int j = i; j <= N / 2; j++) { if (i + j >= N) break; for (int k = j; k <= N; k++) { if (i + j + k > N) break; if (i + j + k == N) cout << i << " " << j << " " << k << "\n"; } } } }