#include <bits/stdc++.h>
#define ll long long
using namespace std;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    int n;
    cin>>n;
    int x,y,z;
    cin >> x >> y >> z;
    cout << max(x,max(y,z)) - min(x, (min(y,z))) << endl;
    cout << 1 << " " << 2 << " " << 3;
}
