import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
	    // input A B
        // A+B,A-B,AxB max
        Scanner sc = new Scanner(System.in);
        int numA = sc.nextInt();
        int numB = sc.nextInt();
        int retNum = 0;
        if(numA + numB < numA - numB){
            if(numA - numB < numA * numB){
                retNum = numA * numB;
            } else {
                retNum = numA - numB;
            }
        } else {
            if(numA + numB < numA * numB){
                retNum = numA * numB;
            } else {
                retNum = numA + numB;
            }
        }
        System.out.println(retNum);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
	    // input A B
        // A+B,A-B,AxB max
        Scanner sc = new Scanner(System.in);
        int numA = sc.nextInt();
        int numB = sc.nextInt();
        int retNum = 0;
        if(numA + numB < numA - numB){
            if(numA - numB < numA * numB){
                retNum = numA * numB;
            } else {
                retNum = numA - numB;
            }
        } else {
            if(numA + numB < numA * numB){
                retNum = numA * numB;
            } else {
                retNum = numA + numB;
            }
        }
        System.out.println(retNum);
    }
} Main public static void main(String[] args) {
	    // input A B
        // A+B,A-B,AxB max
        Scanner sc = new Scanner(System.in);
        int numA = sc.nextInt();
        int numB = sc.nextInt();
        int retNum = 0;
        if(numA + numB < numA - numB){
            if(numA - numB < numA * numB){
                retNum = numA * numB;
            } else {
                retNum = numA - numB;
            }
        } else {
            if(numA + numB < numA * numB){
                retNum = numA * numB;
            } else {
                retNum = numA + numB;
            }
        }
        System.out.println(retNum);
    } main {
	    // input A B
        // A+B,A-B,AxB max
        Scanner sc = new Scanner(System.in);
        int numA = sc.nextInt();
        int numB = sc.nextInt();
        int retNum = 0;
        if(numA + numB < numA - numB){
            if(numA - numB < numA * numB){
                retNum = numA * numB;
            } else {
                retNum = numA - numB;
            }
        } else {
            if(numA + numB < numA * numB){
                retNum = numA * numB;
            } else {
                retNum = numA + numB;
            }
        }
        System.out.println(retNum);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int numA = sc.nextInt(); numA sc.nextInt() sc.nextInt sc int numB = sc.nextInt(); numB sc.nextInt() sc.nextInt sc int retNum = 0; retNum 0 if(numA + numB < numA - numB){
            if(numA - numB < numA * numB){
                retNum = numA * numB;
            } else {
                retNum = numA - numB;
            }
        } else {
            if(numA + numB < numA * numB){
                retNum = numA * numB;
            } else {
                retNum = numA + numB;
            }
        } numA + numB < numA - numB numA + numB numA numB numA - numB numA numB {
            if(numA - numB < numA * numB){
                retNum = numA * numB;
            } else {
                retNum = numA - numB;
            }
        } if(numA - numB < numA * numB){
                retNum = numA * numB;
            } else {
                retNum = numA - numB;
            } numA - numB < numA * numB numA - numB numA numB numA * numB numA numB {
                retNum = numA * numB;
            } retNum = numA * numB retNum numA * numB numA numB {
                retNum = numA - numB;
            } retNum = numA - numB retNum numA - numB numA numB {
            if(numA + numB < numA * numB){
                retNum = numA * numB;
            } else {
                retNum = numA + numB;
            }
        } if(numA + numB < numA * numB){
                retNum = numA * numB;
            } else {
                retNum = numA + numB;
            } numA + numB < numA * numB numA + numB numA numB numA * numB numA numB {
                retNum = numA * numB;
            } retNum = numA * numB retNum numA * numB numA numB {
                retNum = numA + numB;
            } retNum = numA + numB retNum numA + numB numA numB System.out.println(retNum) System.out.println System.out System System.out retNum String[] args args public class Main {

    public static void main(String[] args) {
	    // input A B
        // A+B,A-B,AxB max
        Scanner sc = new Scanner(System.in);
        int numA = sc.nextInt();
        int numB = sc.nextInt();
        int retNum = 0;
        if(numA + numB < numA - numB){
            if(numA - numB < numA * numB){
                retNum = numA * numB;
            } else {
                retNum = numA - numB;
            }
        } else {
            if(numA + numB < numA * numB){
                retNum = numA * numB;
            } else {
                retNum = numA + numB;
            }
        }
        System.out.println(retNum);
    }
} public class Main {

    public static void main(String[] args) {
	    // input A B
        // A+B,A-B,AxB max
        Scanner sc = new Scanner(System.in);
        int numA = sc.nextInt();
        int numB = sc.nextInt();
        int retNum = 0;
        if(numA + numB < numA - numB){
            if(numA - numB < numA * numB){
                retNum = numA * numB;
            } else {
                retNum = numA - numB;
            }
        } else {
            if(numA + numB < numA * numB){
                retNum = numA * numB;
            } else {
                retNum = numA + numB;
            }
        }
        System.out.println(retNum);
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
	    // input A B
        // A+B,A-B,AxB max
        Scanner sc = new Scanner(System.in);
        int numA = sc.nextInt();
        int numB = sc.nextInt();
        int retNum = 0;
        if(numA + numB < numA - numB){
            if(numA - numB < numA * numB){
                retNum = numA * numB;
            } else {
                retNum = numA - numB;
            }
        } else {
            if(numA + numB < numA * numB){
                retNum = numA * numB;
            } else {
                retNum = numA + numB;
            }
        }
        System.out.println(retNum);
    }
}
