def _separate_poly_nonpoly(system, symbols):
    polys = []
    polys_expr = []
    nonpolys = []
    denominators = set()
    poly = None
    for eq in system:
        denominators.update(_simple_dens(eq, symbols))
        without_radicals = unrad(simplify(eq))
        if without_radicals:
            (eq_unrad, cov) = without_radicals
            if (not cov):
                eq = eq_unrad
        if isinstance(eq, Expr):
            eq = eq.as_numer_denom()[0]
            poly = eq.as_poly(*symbols, extension=True)
        elif simplify(eq).is_number:
            continue
        if (poly is not None):
            polys.append(poly)
            polys_expr.append(poly.as_expr())
        else:
            nonpolys.append(eq)
    return (polys, polys_expr, nonpolys, denominators)
def _separate_poly_nonpoly(system, symbols):
    polys = []
    polys_expr = []
    nonpolys = []
    denominators = set()
    poly = None
    for eq in system:
        denominators.update(_simple_dens(eq, symbols))
        without_radicals = unrad(simplify(eq))
        if without_radicals:
            (eq_unrad, cov) = without_radicals
            if (not cov):
                eq = eq_unrad
        if isinstance(eq, Expr):
            eq = eq.as_numer_denom()[0]
            poly = eq.as_poly(*symbols, extension=True)
        elif simplify(eq).is_number:
            continue
        if (poly is not None):
            polys.append(poly)
            polys_expr.append(poly.as_expr())
        else:
            nonpolys.append(eq)
    return (polys, polys_expr, nonpolys, denominators)