#include <algorithm>
#include <cmath>
#include <iostream>
#include <iterator>
#include <type_traits>
#include <vector>
using namespace std;
template < typename T>
enable_if_t< decltype( div ( declval< T> ( ) , declval< T> ( ) ) ) { 1 , 0 } .quot ! = 0 , decltype( div ( declval< T> ( ) , declval< T> ( ) ) ) > make_div( const T quot, const T rem) { return { quot, rem } ; }
template < typename T>
enable_if_t< decltype( div ( declval< T> ( ) , declval< T> ( ) ) ) { 1 , 0 } .quot == 0 , decltype( div ( declval< T> ( ) , declval< T> ( ) ) ) > make_div( const T quot, const T rem) { return { rem, quot } ; }
int main( ) {
const auto test = make_div( 1 , 2 ) ;
cout << test.quot << ' ' << test.rem << endl;
}
I2luY2x1ZGUgPGFsZ29yaXRobT4KI2luY2x1ZGUgPGNtYXRoPgojaW5jbHVkZSA8aW9zdHJlYW0+CiNpbmNsdWRlIDxpdGVyYXRvcj4KI2luY2x1ZGUgPHR5cGVfdHJhaXRzPgojaW5jbHVkZSA8dmVjdG9yPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCnRlbXBsYXRlIDx0eXBlbmFtZSBUPgplbmFibGVfaWZfdDxkZWNsdHlwZShkaXYoZGVjbHZhbDxUPigpLCBkZWNsdmFsPFQ+KCkpKXsgMSwgMCB9LnF1b3QgIT0gMCwgZGVjbHR5cGUoZGl2KGRlY2x2YWw8VD4oKSwgZGVjbHZhbDxUPigpKSk+IG1ha2VfZGl2KGNvbnN0IFQgcXVvdCwgY29uc3QgVCByZW0pIHsgcmV0dXJuIHsgcXVvdCwgcmVtIH07IH0KdGVtcGxhdGUgPHR5cGVuYW1lIFQ+CmVuYWJsZV9pZl90PGRlY2x0eXBlKGRpdihkZWNsdmFsPFQ+KCksIGRlY2x2YWw8VD4oKSkpeyAxLCAwIH0ucXVvdCA9PSAwLCBkZWNsdHlwZShkaXYoZGVjbHZhbDxUPigpLCBkZWNsdmFsPFQ+KCkpKT4gbWFrZV9kaXYoY29uc3QgVCBxdW90LCBjb25zdCBUIHJlbSkgeyByZXR1cm4geyByZW0sIHF1b3QgfTsgfQoKaW50IG1haW4oKSB7Cgljb25zdCBhdXRvIHRlc3QgPSBtYWtlX2RpdigxLCAyKTsKCgljb3V0IDw8IHRlc3QucXVvdCA8PCAnICcgPDwgdGVzdC5yZW0gPDwgZW5kbDsKfQ==