#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#define ff first
#define ss second
#define szof(x) ((int)x.size())
#ifndef LOCAL
#  define cerr __get_ce
#endif

using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef unsigned long long ull;

using namespace __gnu_pbds;
template <typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
template <typename K, typename V> using ordered_map = tree<K, V, less<K>, rb_tree_tag, tree_order_statistics_node_update>;

int const INF = (int)1e9 + 1e3;
ll const INFL = (ll)1e18 + 1e6;

#ifdef LOCAL
	mt19937 tw(9450189);
#else
	mt19937 tw(chrono::high_resolution_clock::now().time_since_epoch().count());
#endif
uniform_int_distribution<ll> ll_distr;
ll rnd(ll a, ll b) { return ll_distr(tw) % (b - a + 1) + a; }


void solve() {
	string ab, c;
	cin >> ab >> c;
	// a / b = c
	// a = b * c
	// 10 ** (|b| - 1 + |c| - 1) <= a <= (10 ** |b| - 1) * (10 ** |c| - 1)
	// 10 ** (|b| + |c| - 2) <= a
	// |b| + |c| - 1 <= |a|
	// a < 10 ** |b| * 10 ** |c|
	// |a| <= |b| + |c|
	// |b| = |ab| - |a|

	// |ab| - |a| + |c| - 1 <= |a|
	// |ab| + |c| - 1 <= 2 * |a|

	// |a| <= |ab| - |a| + |c|
	// 2 * |a| <= |ab| + |c|

	int la2 = szof(ab) + szof(c);
	if (la2 % 2) {
		--la2;
	}

	int la = la2 / 2;

	cout << ab.substr(0, la) << " " << ab.substr(la) << "\n";
}


int main() {
#ifdef LOCAL
	auto start_time = clock();
	cerr << setprecision(3) << fixed;
#endif
	cout << setprecision(15) << fixed;
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
 
	int test_count = 1;
	// cin >> test_count;
	for (int test = 1; test <= test_count; ++test) {
		solve();
	}
	
#ifdef LOCAL
	auto end_time = clock();
	cerr << "Execution time: " << (end_time - start_time) * (int) 1e3 / CLOCKS_PER_SEC << " ms\n";
#endif
}