#include <bits/stdc++.h>
using namespace std;
int main(){
  string s;
  cin>>s;
  int n=s.size();
  for(int i=0;i<(1<<(n-1));i++){
    int ans=s[0]-'0';
    vector<char> enzan;
    for(int j=0;j<n-1;j++){
      if(i&(1<<j)){
        ans-=s[j+1]-'0';
        enzan.push_back('-');
      }else{
        ans+=s[j+1]-'0';
        enzan.push_back('+');
      }
    }
    if(ans==7){
      cout<<s[0]<<enzan[0]<<s[1]<<enzan[1]<<s[2]<<enzan[2]<<s[3]<<'='<<7<<endl;
      return 0;
    }
  }      
  return 0;
}
#include<iostream>
#include<algorithm>
using namespace std;

int main(){

	int n, prime[10001], p[10001];

	fill(prime, prime+10001, 1);
	fill(p, p+10001, 0);
	
	prime[0] = 0;
	prime[1] = 0;
	for(int i=2; i<10001; i++){
		if(prime[i] == 1){
			if(prime[i-2] == 1) p[i] = 1;
			for(int j=2; i*j<10001; j++){
				prime[i*j] = 0;
			}
		}
	}
	
	while(cin >> n){
		if(n == 0) break;
		for(int i=n; i>0; i--){
			if(p[i] == 1) {
				cout << i-2 << " " << i << endl;
				break;
			}
		}
	}
	
	return 0;

}