#include <bits/stdc++.h>
using std::abs;
using std::bitset;
using std::cerr;
using std::cin;
using std::cout;
using std::map;
using std::max;
using std::min;
using std::pair;
using std::set;
using std::sort;
using std::string;
using std::swap;
using std::unordered_map;
using std::unordered_set;
using std::vector;
using ll = long long;
using uint = unsigned int;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using ull = unsigned long long;
using ld = long double;
template <typename T>
void _dbg(const char* s, T h) {
  cerr << s << " = " << h << "\n";
}
template <typename T, typename... Ts>
void _dbg(const char* s, T h, Ts... t) {
  int b = 0;
  while (((b += *s == '(') -= *s == ')') != 0 || *s != ',') cerr << *s++;
  cerr << " = " << h << ",";
  _dbg(s + 1, t...);
}
struct init {
  init() {
    cin.tie(0);
    std::iostream::sync_with_stdio(0);
    cout << std::fixed << std::setprecision(10);
    cerr << std::fixed << std::setprecision(5);
  }
  ~init() {}
} init;
template <typename T, typename U>
void upx(T& x, U y) {
  if (x < y) x = y;
}
template <typename T, typename U>
void upn(T& x, U y) {
  if (x > y) x = y;
}
void solve(ll n, ll m) {
  ll l = 1, r = n;
  while (l < r) {
    for (ll i = 1; i <= m; ++i) {
      cout << l << ' ' << i << '\n';
      cout << r << ' ' << m - i + 1 << '\n';
    }
    l++;
    r--;
  }
  if (l == r) {
    for (ll i = 1; i <= m / 2; ++i) {
      cout << l << ' ' << i << '\n';
      cout << l << ' ' << m - i + 1 << '\n';
    }
    if (m & 1) {
      cout << l << ' ' << (m + 1) / 2 << '\n';
    }
  }
}
int32_t main() {
  ll n, m;
  cin >> n >> m;
  solve(n, m);
  return 0;
}
